Exemplo n.º 1
0
        public static Email Using(this Email email, string host, int port, string username = null, string password = null, bool useSsl = true)
        {
            var server = new SmtpServer
            {
                Host      = host,
                Port      = port,
                Username  = username,
                Password  = password,
                EnableSSL = useSsl
            };

            email.Server = server;
            return(email);
        }
Exemplo n.º 2
0
 public static Email Using(this Email email, string host, int port, string username = null, string password = null, bool useSsl = true)
 {
     var server = new SmtpServer
     {
         Host = host,
         Port = port,
         Username = username,
         Password = password,
         EnableSSL = useSsl
     };
     email.Server = server;
     return email;
 }