Browse Source
Merge pull request #1281 from colinin/fix-multiple-to-mails
fix(platform): The email system automatically resolves the recipient
pull/1284/head
yx lin
8 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
6 deletions
-
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Messages/EmailMessageManager.cs
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using System; |
|
|
|
using System.IO; |
|
|
|
using System.Net; |
|
|
|
using System.Net.Mail; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using System.Threading.Tasks; |
|
|
|
@ -76,11 +77,7 @@ public class EmailMessageManager : DomainService, IEmailMessageManager |
|
|
|
IsBodyHtml = message.IsBodyHtml, |
|
|
|
}; |
|
|
|
|
|
|
|
var toAddresses = message.Receiver.Split(new[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries); |
|
|
|
foreach (var address in toAddresses) |
|
|
|
{ |
|
|
|
mailMessage.To.Add(address.Trim()); |
|
|
|
} |
|
|
|
mailMessage.To.Add(message.Receiver); |
|
|
|
|
|
|
|
if (!message.CC.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
|