use domain from setting à sending credentials against smtp server

This commit is contained in:
2019-03-07 12:08:17 +00:00
parent 06041f1405
commit 2df37f692d
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ namespace Yavsc
public int Port { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string Domain { get; set; }
public bool EnableSSL { get; set; }
}

View File

@ -65,7 +65,7 @@ namespace Yavsc.Services
SecureSocketOptions.Auto);
if (smtpSettings.UserName!=null) {
NetworkCredential creds = new NetworkCredential(
smtpSettings.UserName, smtpSettings.Password, smtpSettings.Host);
smtpSettings.UserName, smtpSettings.Password, smtpSettings.Domain);
await sc.AuthenticateAsync(System.Text.Encoding.UTF8, creds, System.Threading.CancellationToken.None);
}