From 31634e653a59ba198a8822ab08f40c5c7577d19d Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Thu, 5 May 2022 10:45:04 +0500 Subject: [PATCH] disable really email send --- AsbCloudInfrastructure/Services/Email/EmailService.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/AsbCloudInfrastructure/Services/Email/EmailService.cs b/AsbCloudInfrastructure/Services/Email/EmailService.cs index a969a943..20c01a5a 100644 --- a/AsbCloudInfrastructure/Services/Email/EmailService.cs +++ b/AsbCloudInfrastructure/Services/Email/EmailService.cs @@ -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;