Beispiel #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
     });
 }
Beispiel #2
0
 public EmailService(EmailSettingsModel emailSettings)
 {
     _emailSettings = emailSettings;
 }