diff --git a/IRaCIS.Core.API/appsettings.Development.json b/IRaCIS.Core.API/appsettings.Development.json index 4333cf480..472565ed7 100644 --- a/IRaCIS.Core.API/appsettings.Development.json +++ b/IRaCIS.Core.API/appsettings.Development.json @@ -22,7 +22,7 @@ }, "SystemEmailSendConfig": { - "Port": 25, + "Port": 465, "Host": "smtp.qiye.aliyun.com", "FromEmail": "test@extimaging.com", "FromName": "Test_IRC", diff --git a/IRaCIS.Core.API/appsettings.Staging.json b/IRaCIS.Core.API/appsettings.Staging.json index 52e93a6ee..5f31dbb97 100644 --- a/IRaCIS.Core.API/appsettings.Staging.json +++ b/IRaCIS.Core.API/appsettings.Staging.json @@ -19,7 +19,7 @@ }, "SystemEmailSendConfig": { - "Port": 25, + "Port": 465, "Host": "smtp.qiye.aliyun.com", "FromEmail": "uat@extimaging.com", "FromName": "UAT_IRC", diff --git a/IRaCIS.Core.Application/Helper/SendEmailHelper.cs b/IRaCIS.Core.Application/Helper/SendEmailHelper.cs index 1a10db402..aa5ee76b2 100644 --- a/IRaCIS.Core.Application/Helper/SendEmailHelper.cs +++ b/IRaCIS.Core.Application/Helper/SendEmailHelper.cs @@ -27,7 +27,7 @@ public static class SendEmailHelper //await smtp.AuthenticateAsync("zhou941003@qq.com", "sqfhlpfdvnexbcab"); - await smtp.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.Auto); + await smtp.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.SslOnConnect); await smtp.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);