Exemplo n.º 1
0
 private SmtpClient GetClient(EmailSettingsModel emailSettings)
 {
     return(new SmtpClient
     {
         Port = emailSettings.Port,
         EnableSsl = true,
         DeliveryMethod = SmtpDeliveryMethod.Network,
         UseDefaultCredentials = false,
         Credentials = new System.Net.NetworkCredential(emailSettings.Username, emailSettings.Password),
         Host = emailSettings.Server
     });
 }
Exemplo n.º 2
0
 public EmailService(EmailSettingsModel emailSettings)
 {
     _emailSettings = emailSettings;
 }