diff --git a/src/Yavsc.Server/Settings/SmtpSettings.cs b/src/Yavsc.Server/Settings/SmtpSettings.cs index 44fd9e9c..6775d66e 100644 --- a/src/Yavsc.Server/Settings/SmtpSettings.cs +++ b/src/Yavsc.Server/Settings/SmtpSettings.cs @@ -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; } } diff --git a/src/Yavsc/Services/MailSender.cs b/src/Yavsc/Services/MailSender.cs index f25b7d2b..d4700eb0 100644 --- a/src/Yavsc/Services/MailSender.cs +++ b/src/Yavsc/Services/MailSender.cs @@ -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); }