From 3737da45caa09533ba05f4536a2428d27a00dee8 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 4 Apr 2017 21:05:23 -0400 Subject: [PATCH] yuck --- Project-Unite/App_Start/IdentityConfig.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Project-Unite/App_Start/IdentityConfig.cs b/Project-Unite/App_Start/IdentityConfig.cs index eda6b72..30d7211 100644 --- a/Project-Unite/App_Start/IdentityConfig.cs +++ b/Project-Unite/App_Start/IdentityConfig.cs @@ -25,6 +25,7 @@ public async Task SendAsync(IdentityMessage message) var siteConfig = new ApplicationDbContext().Configs.FirstOrDefault(); var smtp = new SmtpClient(siteConfig.SMTPServer, siteConfig.SMTPPort); + smtp.UseDefaultCredentials = false; if (siteConfig.UseTLSEncryption) smtp.EnableSsl = true; //This is misleading... We want TLS but all we have is SSL. Oh well. smtp.UseDefaultCredentials = false; @@ -38,6 +39,7 @@ public async Task SendAsync(IdentityMessage message)

" + CommonMark.CommonMarkConverter.Convert(message.Body) + "

"; sMsg.Subject = $"[{siteConfig.SiteName}] " + message.Subject; sMsg.IsBodyHtml = true; + smtp.DeliveryMethod = SmtpDeliveryMethod.Network; var db = new ApplicationDbContext(); db.AuditLogs.Add(new AuditLog("system", AuditLogLevel.Admin, $"Email sending...

To: {sMsg.To}
Subject:
{sMsg.Subject}")); db.SaveChanges();