public static EmailLog GetEmailLogFromMailMessage(MailMessage mailObj) { EmailLog obj = new EmailLog(); obj.SenderName = mailObj.Sender.DisplayName; obj.SenderEmailAddress = mailObj.Sender.Address; obj.ToEmailAddresses = EmailHelper.GetMailAddressesAsString(mailObj.To); obj.FromEmailAddress = mailObj.From.Address; obj.Message = mailObj.Body; obj.Subject = mailObj.Subject; obj.VisitorIP = HttpContext.Current.Request.UserHostAddress; obj.RequestUrl = URIHelper.GetCurrentVirtualPath(true); obj.DateCreated = DateTime.Now; obj.DateLastModified = DateTime.Now; return(obj); }
public string GetCacheKey(RenderVersion renderVersion) { var path = (renderVersion.ToString() + URIHelper.GetCurrentVirtualPath().Replace("~", "")).ToLower(); return(path); }