mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
More auditing.
This commit is contained in:
parent
35a0980d93
commit
0571a9c8d9
1 changed files with 10 additions and 8 deletions
|
@ -37,14 +37,15 @@ public Task SendAsync(IdentityMessage msg)
|
||||||
Subject = "[ShiftOS] " + msg.Subject,
|
Subject = "[ShiftOS] " + msg.Subject,
|
||||||
BodyHtml = msg.Body,
|
BodyHtml = msg.Body,
|
||||||
Tracking = true,
|
Tracking = true,
|
||||||
FooterAddress = "sys@michaeltheshifter.me",
|
|
||||||
SignatureDomain = "getshiftos.ml"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var result = reachmail.Easysmtp.Post(request);
|
var result = reachmail.Easysmtp.Post(request);
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.AppendLine("<strong>Email summary</strong>");
|
||||||
|
sb.AppendLine("Current volume: " + result.CurrentVolume.ToString());
|
||||||
if (result.Failures)
|
if (result.Failures)
|
||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
|
||||||
sb.AppendLine("A fatal exception has occurred in the Unite mail backend.");
|
sb.AppendLine("A fatal exception has occurred in the Unite mail backend.");
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine("Basically, we couldn't send messages to the following addresses: ");
|
sb.AppendLine("Basically, we couldn't send messages to the following addresses: ");
|
||||||
|
@ -54,12 +55,13 @@ public Task SendAsync(IdentityMessage msg)
|
||||||
sb.AppendLine(" - " + addr.Email);
|
sb.AppendLine(" - " + addr.Email);
|
||||||
sb.AppendLine(" - Reason: " + addr.Reason);
|
sb.AppendLine(" - Reason: " + addr.Reason);
|
||||||
}
|
}
|
||||||
sb.AppendLine("FUCKING CONTACT MICHAEL. NOW.");
|
sb.AppendLine("I don't want to swear, but seriously. I need to fix this. - Michael");
|
||||||
string exc = sb.ToString();
|
|
||||||
var db = new ApplicationDbContext();
|
|
||||||
db.AuditLogs.Add(new AuditLog("system", AuditLogLevel.Admin, exc));
|
|
||||||
db.SaveChanges();
|
|
||||||
}
|
}
|
||||||
|
string exc = sb.ToString();
|
||||||
|
var db = new ApplicationDbContext();
|
||||||
|
db.AuditLogs.Add(new AuditLog("system", AuditLogLevel.Admin, exc));
|
||||||
|
db.SaveChanges();
|
||||||
return Task.FromResult<DeliveryResponse>(result);
|
return Task.FromResult<DeliveryResponse>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue