From e0e6e60ae0731eadb936792f39f833644f4e528f Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 8 Dec 2025 10:14:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E7=AB=AF=E5=8F=A3=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E5=88=B0=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/appsettings.Event_IRC.json | 1 + IRaCIS.Core.API/appsettings.Prod_IRC.json | 1 + IRaCIS.Core.API/appsettings.Test_IRC.json | 2 ++ IRaCIS.Core.API/appsettings.Test_IRC_PGSQL.json | 1 + IRaCIS.Core.API/appsettings.US_Prod_IRC.json | 1 + IRaCIS.Core.API/appsettings.US_Test_IRC.json | 1 + IRaCIS.Core.API/appsettings.US_Uat_IRC.json | 1 + IRaCIS.Core.API/appsettings.Uat_IRC.json | 1 + .../BusinessFilter/_Config/_AppSettings.cs | 2 ++ IRaCIS.Core.Application/Service/Common/EmailLogService.cs | 8 ++++---- 10 files changed, 15 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.API/appsettings.Event_IRC.json b/IRaCIS.Core.API/appsettings.Event_IRC.json index ce1553328..ae67d935c 100644 --- a/IRaCIS.Core.API/appsettings.Event_IRC.json +++ b/IRaCIS.Core.API/appsettings.Event_IRC.json @@ -63,6 +63,7 @@ "Port": 465, "Host": "smtp.qiye.aliyun.com", "Imap": "imap.qiye.aliyun.com", + "ImapPort": 993, "FromEmail": "uat@extimaging.com", "FromName": "UAT_IRC", "AuthorizationCode": "SHzyyl2021", diff --git a/IRaCIS.Core.API/appsettings.Prod_IRC.json b/IRaCIS.Core.API/appsettings.Prod_IRC.json index 355f6e87f..c3fe60922 100644 --- a/IRaCIS.Core.API/appsettings.Prod_IRC.json +++ b/IRaCIS.Core.API/appsettings.Prod_IRC.json @@ -62,6 +62,7 @@ "Port": 465, "Host": "smtp.qiye.aliyun.com", "Imap": "imap.qiye.aliyun.com", + "ImapPort": 993, "FromEmail": "irc@extimaging.com", "FromName": "IRC Imaging System", "AuthorizationCode": "ExtImg@2022", diff --git a/IRaCIS.Core.API/appsettings.Test_IRC.json b/IRaCIS.Core.API/appsettings.Test_IRC.json index 1f8b3569e..f92ac78ea 100644 --- a/IRaCIS.Core.API/appsettings.Test_IRC.json +++ b/IRaCIS.Core.API/appsettings.Test_IRC.json @@ -127,6 +127,8 @@ "Host": "smtp.qiye.aliyun.com", "Imap": "imap.qiye.aliyun.com", + + "ImapPort": 993, // 发件人邮箱地址 "FromEmail": "test@extimaging.com", // 发件人显示名称 diff --git a/IRaCIS.Core.API/appsettings.Test_IRC_PGSQL.json b/IRaCIS.Core.API/appsettings.Test_IRC_PGSQL.json index 4f677e98e..3fa1432e8 100644 --- a/IRaCIS.Core.API/appsettings.Test_IRC_PGSQL.json +++ b/IRaCIS.Core.API/appsettings.Test_IRC_PGSQL.json @@ -76,6 +76,7 @@ "Port": 465, "Host": "smtp.qiye.aliyun.com", "Imap": "imap.qiye.aliyun.com", + "ImapPort": 993, "FromEmail": "test@extimaging.com", "FromName": "Test_IRC", "AuthorizationCode": "SHzyyl2021", diff --git a/IRaCIS.Core.API/appsettings.US_Prod_IRC.json b/IRaCIS.Core.API/appsettings.US_Prod_IRC.json index b77bd8fe7..e7096b058 100644 --- a/IRaCIS.Core.API/appsettings.US_Prod_IRC.json +++ b/IRaCIS.Core.API/appsettings.US_Prod_IRC.json @@ -67,6 +67,7 @@ "Port": 587, "Host": "smtp-mail.outlook.com", "Imap": "imap-mail.outlook.com", + "ImapPort": 993, "FromEmail": "donotreply@elevateimaging.ai", "FromName": "LiLi System", "AuthorizationCode": "Q#669869497420ul", diff --git a/IRaCIS.Core.API/appsettings.US_Test_IRC.json b/IRaCIS.Core.API/appsettings.US_Test_IRC.json index e5bfed0ba..a8667d8c8 100644 --- a/IRaCIS.Core.API/appsettings.US_Test_IRC.json +++ b/IRaCIS.Core.API/appsettings.US_Test_IRC.json @@ -75,6 +75,7 @@ "Port": 587, "Host": "smtp-mail.outlook.com", "Imap": "imap-mail.outlook.com", + "ImapPort": 993, "FromEmail": "donotreply@elevateimaging.ai", "FromName": "LiLi System", "AuthorizationCode": "Q#669869497420ul", diff --git a/IRaCIS.Core.API/appsettings.US_Uat_IRC.json b/IRaCIS.Core.API/appsettings.US_Uat_IRC.json index 7930718fd..7a4a841a7 100644 --- a/IRaCIS.Core.API/appsettings.US_Uat_IRC.json +++ b/IRaCIS.Core.API/appsettings.US_Uat_IRC.json @@ -74,6 +74,7 @@ "Port": 587, "Host": "smtp-mail.outlook.com", "Imap": "imap-mail.outlook.com", + "ImapPort": 993, "FromEmail": "donotreply@elevateimaging.ai", "FromName": "LiLi System", "AuthorizationCode": "Q#669869497420ul", diff --git a/IRaCIS.Core.API/appsettings.Uat_IRC.json b/IRaCIS.Core.API/appsettings.Uat_IRC.json index 368b23195..1afacc3a0 100644 --- a/IRaCIS.Core.API/appsettings.Uat_IRC.json +++ b/IRaCIS.Core.API/appsettings.Uat_IRC.json @@ -81,6 +81,7 @@ "Port": 465, "Host": "smtp.qiye.aliyun.com", "Imap": "imap.qiye.aliyun.com", + "ImapPort": 993, "FromEmail": "uat@extimaging.com", "FromName": "Uat IRC Imaging System", "AuthorizationCode": "SHzyyl2021", diff --git a/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs b/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs index cb1ff82a8..0983bd60c 100644 --- a/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs +++ b/IRaCIS.Core.Application/BusinessFilter/_Config/_AppSettings.cs @@ -49,6 +49,8 @@ public class SystemEmailSendConfig public string Host { get; set; } = string.Empty; public string Imap { get; set; } = string.Empty; + + public int ImapPort { get; set; } public string FromEmail { get; set; } = string.Empty; public string FromName { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Application/Service/Common/EmailLogService.cs b/IRaCIS.Core.Application/Service/Common/EmailLogService.cs index 257619e5e..5668825b4 100644 --- a/IRaCIS.Core.Application/Service/Common/EmailLogService.cs +++ b/IRaCIS.Core.Application/Service/Common/EmailLogService.cs @@ -119,7 +119,7 @@ public class EmailLogService(IRepository _emailLogRepository, { try { - client.Connect(_systemEmailConfig.Imap, 993, SecureSocketOptions.SslOnConnect); + client.Connect(_systemEmailConfig.Imap, _systemEmailConfig.ImapPort, SecureSocketOptions.SslOnConnect); AuthenticateImap(client); var sentFolder = OpenSentFolder(client); var uid = new UniqueId(uint.Parse(emailInfo.UniqueId)); @@ -205,7 +205,7 @@ public class EmailLogService(IRepository _emailLogRepository, { try { - client.Connect(_systemEmailConfig.Imap, 993, SecureSocketOptions.SslOnConnect); + client.Connect(_systemEmailConfig.Imap, _systemEmailConfig.ImapPort, SecureSocketOptions.SslOnConnect); AuthenticateImap(client); var sentFolder = OpenSentFolder(client); var uid = new UniqueId(uint.Parse(emailInfo.UniqueId)); @@ -279,7 +279,7 @@ public class EmailLogService(IRepository _emailLogRepository, { try { - client.Connect(_systemEmailConfig.Imap, 993, SecureSocketOptions.SslOnConnect); + client.Connect(_systemEmailConfig.Imap, _systemEmailConfig.ImapPort, SecureSocketOptions.SslOnConnect); AuthenticateImap(client); var sentFolder = OpenSentFolder(client); @@ -529,7 +529,7 @@ public class EmailLogService(IRepository _emailLogRepository, { try { - client.Connect(_systemEmailConfig.Imap, 993, SecureSocketOptions.SslOnConnect); + client.Connect(_systemEmailConfig.Imap, _systemEmailConfig.ImapPort, SecureSocketOptions.SslOnConnect); AuthenticateImap(client); var inboxFolder = OpenInboxFolder(client);