disable really email send

This commit is contained in:
ngfrolov 2022-05-05 10:45:04 +05:00
parent 1c6dd22d33
commit 31634e653a

View File

@ -79,17 +79,16 @@ namespace AsbCloudInfrastructure.Services
foreach (var mailAddress in mailAddresses)
message.To.Add(mailAddress);
message.Body = htmlBody;
message.Subject = subject;
message.IsBodyHtml = true;
var client = new SmtpClient(smtpServer);
using var client = new SmtpClient(smtpServer);
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential(sender, smtpPassword);
await client.SendMailAsync(message, token);
//await client.SendMailAsync(message, token);
Trace.TraceInformation($"Send email to {string.Join(',', addresses)} subj:{subject} html body count {htmlBody.Count()}");
};
return func;