Move email IP to audit summary

This commit is contained in:
Michael 2017-04-13 09:54:37 -04:00
parent f03f01f3c9
commit c5506fc9f9
2 changed files with 3 additions and 4 deletions

View file

@ -41,7 +41,7 @@ namespace Project_Unite
sMsg.IsBodyHtml = true; sMsg.IsBodyHtml = true;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
var db = new ApplicationDbContext(); var db = new ApplicationDbContext();
db.AuditLogs.Add(new AuditLog("system", AuditLogLevel.Admin, $"Email sending...<br/><br/><strong>To:</strong> {sMsg.To}<br/><strong>Subject:</strong><br/>{sMsg.Subject}")); db.AuditLogs.Add(new AuditLog("system", AuditLogLevel.Admin, $"Email sending...<br/><br/><strong>To:</strong> {sMsg.To}<br/><strong>Subject:</strong><br/>{sMsg.Subject}<br/><strong>Invoker IP:</strong>{HttpContext.Current.Request.UserHostAddress}"));
db.SaveChanges(); db.SaveChanges();
smtp.SendCompleted += async (o, a) => smtp.SendCompleted += async (o, a) =>
{ {

View file

@ -71,11 +71,10 @@ A user has registered to the ShiftOS website using this email address as a sign-
**If this was not you**: **If this was not you**:
The addressed used to send this message is not a no-reply address. In fact, my name is Michael, admin of the site. We may have a bit of an identity theft issue, or something, going on here, but there's something I can do to help - all you have to do is reply to this email. I have the IP address, display name and ID of the user who triggered this email - just let me know and I can purge the account for you and ban the user's IP address and you won't have issues anymore. Thanks! The address used to send this message is not a no-reply address. In fact, my name is Michael, admin of the site. We may have a bit of an identity theft issue, or something, going on here, but there's something I can do to help - all you have to do is reply to this email. I have the IP address, display name and ID of the user who triggered this email - just let me know and I can purge the account for you and ban the user's IP address and you won't have issues anymore. Thanks!
**User ID:** {uid} **User ID:** {uid}
**Display name:** {usr.DisplayName} **Display name:** {usr.DisplayName}");
**Last known IP address:** {usr.LastKnownIPAddress}");
return View(); return View();
} }