Browse Source
Merge pull request #5112 from abpframework/liangshiwei/mailkit-patch-1
Use async methods in the MailKitSmtpEmailSender
pull/5117/head
maliming
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
4 deletions
-
framework/src/Volo.Abp.MailKit/Volo/Abp/MailKit/MailKitSmtpEmailSender.cs
|
|
|
@ -56,21 +56,21 @@ namespace Volo.Abp.MailKit |
|
|
|
|
|
|
|
protected virtual async Task ConfigureClient(SmtpClient client) |
|
|
|
{ |
|
|
|
client.Connect( |
|
|
|
await client.ConnectAsync( |
|
|
|
await SmtpConfiguration.GetHostAsync(), |
|
|
|
await SmtpConfiguration.GetPortAsync(), |
|
|
|
await GetSecureSocketOption() |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
if (await SmtpConfiguration.GetUseDefaultCredentialsAsync()) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
client.Authenticate( |
|
|
|
await client.AuthenticateAsync( |
|
|
|
await SmtpConfiguration.GetUserNameAsync(), |
|
|
|
await SmtpConfiguration.GetPasswordAsync() |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual async Task<SecureSocketOptions> GetSecureSocketOption() |
|
|
|
|