use domain from setting à sending credentials against smtp server
This commit is contained in:
parent
4a314400ab
commit
c8321fc72f
2 changed files with 2 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ namespace Yavsc
|
||||||
public int Port { get; set; }
|
public int Port { get; set; }
|
||||||
public string UserName { get; set; }
|
public string UserName { get; set; }
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
|
public string Domain { get; set; }
|
||||||
|
|
||||||
public bool EnableSSL { get; set; }
|
public bool EnableSSL { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ namespace Yavsc.Services
|
||||||
SecureSocketOptions.Auto);
|
SecureSocketOptions.Auto);
|
||||||
if (smtpSettings.UserName!=null) {
|
if (smtpSettings.UserName!=null) {
|
||||||
NetworkCredential creds = new NetworkCredential(
|
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);
|
await sc.AuthenticateAsync(System.Text.Encoding.UTF8, creds, System.Threading.CancellationToken.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue