mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 11:21:47 -05:00
Asynchronously send mails.
This commit is contained in:
parent
c40b616265
commit
39a0312f7f
1 changed files with 5 additions and 1 deletions
|
@ -38,7 +38,9 @@ public Task SendAsync(IdentityMessage message)
|
|||
<p>" + CommonMark.CommonMarkConverter.Convert(message.Body) + "</p>";
|
||||
sMsg.Subject = $"[{siteConfig.SiteName}] " + message.Subject;
|
||||
sMsg.IsBodyHtml = true;
|
||||
smtp.Send(sMsg);
|
||||
smtp.SendAsync(sMsg, null));
|
||||
var db = new ApplicationDbContext();
|
||||
db.AuditLogs.Add(new AuditLog("system", AuditLogLevel.Admin, $"Email sent successfully.<br/><br/><strong>To:</strong> {sMsg.To}<br/><strong>Subject:</strong><br/>{sMsg.Subject}"));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -50,6 +52,8 @@ public Task SendAsync(IdentityMessage message)
|
|||
}
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class SmsService : IIdentityMessageService
|
||||
|
|
Loading…
Reference in a new issue