master
wanghaomei 5 months ago
parent 978601da8e
commit 50281d64bc

@ -141,6 +141,26 @@ namespace MailSend.Service
message.To.Add(MailboxAddress.Parse(sendMail.SendTo));
}
if (!string.IsNullOrEmpty(sendMail.CCTo))
{
if (sendMail.CCTo.IndexOf(";") > -1)
{
var arrCCTo = sendMail.CCTo.Split(";".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
foreach (var s in arrCCTo)
{
var trimStr = s.Trim();
if (!string.IsNullOrEmpty(trimStr))
{
message.Cc.Add(MailboxAddress.Parse(trimStr));
}
}
}
else
{
message.To.Add(MailboxAddress.Parse(sendMail.CCTo));
}
}
message.Subject = sendMail.Title;
var html = new TextPart("html")
{

Loading…
Cancel
Save