summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-18 15:35:47 -0400
committerMichael <[email protected]>2017-05-18 15:35:47 -0400
commit0571a9c8d98d3d01bc1a821577c181a0b722e6c7 (patch)
tree77f7145dc47426c2706cf93a94bb59daea88eaf5
parent35a0980d935834a8b378cb0c939ee64c29e4b427 (diff)
downloadproject-unite-0571a9c8d98d3d01bc1a821577c181a0b722e6c7.tar.gz
project-unite-0571a9c8d98d3d01bc1a821577c181a0b722e6c7.tar.bz2
project-unite-0571a9c8d98d3d01bc1a821577c181a0b722e6c7.zip
More auditing.
-rw-r--r--Project-Unite/App_Start/IdentityConfig.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/Project-Unite/App_Start/IdentityConfig.cs b/Project-Unite/App_Start/IdentityConfig.cs
index 1d79bb5..61310c4 100644
--- a/Project-Unite/App_Start/IdentityConfig.cs
+++ b/Project-Unite/App_Start/IdentityConfig.cs
@@ -37,14 +37,15 @@ namespace Project_Unite
Subject = "[ShiftOS] " + msg.Subject,
BodyHtml = msg.Body,
Tracking = true,
- FooterAddress = "[email protected]",
- SignatureDomain = "getshiftos.ml"
};
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)
{
- var sb = new StringBuilder();
sb.AppendLine("A fatal exception has occurred in the Unite mail backend.");
sb.AppendLine();
sb.AppendLine("Basically, we couldn't send messages to the following addresses: ");
@@ -54,12 +55,13 @@ namespace Project_Unite
sb.AppendLine(" - " + addr.Email);
sb.AppendLine(" - Reason: " + addr.Reason);
}
- sb.AppendLine("FUCKING CONTACT MICHAEL. NOW.");
- string exc = sb.ToString();
- var db = new ApplicationDbContext();
- db.AuditLogs.Add(new AuditLog("system", AuditLogLevel.Admin, exc));
- db.SaveChanges();
+ 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();
return Task.FromResult<DeliveryResponse>(result);
}