Exemplo n.º 1
0
 public static void InitEmail(Func <IContent> getHome)
 {
     GetEmailService = () =>
     {
         IContent     home  = getHome();
         var          email = home.IContentTo <SpxusUmbracoEmailKey>();
         IEmailServer es    = new SPXEmailServer(email.EmailHost, email.EmailPort, email.EmailUser, email.EmailPassword, email.EmailSsl);
         return(es);
     };
 }
Exemplo n.º 2
0
        public static IEmailServer EmailService()
        {
            IContentBase home     = Services.ContentService.GetById(Config[EnvKey.HomeId]);
            var          host     = (string)home.GetValue("emailHost");
            var          ports    = G.Int32((string)home.GetValue("emailPort"), 0);
            var          user     = (string)home.GetValue("emailUser");
            var          password = (string)home.GetValue("emailPassword");
            var          ssl      = G.ToBool(home.GetValue("emailSsl"));
            IEmailServer es       = new SPXEmailServer(host, ports, user, password, ssl);

            return(es);
        }