public static bool SendVerifyEmail(MemberMaster master) { var baseUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.AbsolutePath, string.Empty); var urlHelper = new UrlHelper(HttpContext.Current.Request.RequestContext); var verifyUrl = String.Concat(baseUrl, urlHelper.Action("Active", "Account", new { area = "", id = master.Id, code = master.ActivationCode })); var subject = String.Format("{0} - Verify Your Email", AppSettings.APP_TITLE); var body = String.Format(@"<p>Dear {0},</p><p>Click here to verify your email address and active your account today</p><p><a href='{1}'>Verify your email & active your account</a></p><p>You may active your member status at the following address:{1}</p><p>Thanks,{2}.</p>", master.GetFullName(), verifyUrl, AppSettings.APP_TITLE); return(SendEmail(master.Email_Login, subject, body)); }
public static bool SendProfileEmail(MemberMaster master) { var baseUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.AbsolutePath, string.Empty); var urlHelper = new UrlHelper(HttpContext.Current.Request.RequestContext); var profileUrl = String.Concat(baseUrl, urlHelper.Action("Profile", "Account")); var subject = String.Format(@"{0} - Forgot Password", AppSettings.APP_TITLE); var body = string.Format(@"<p>Dear {0},</p><p>Your username is: {1}.</a><p>You may change your password at the following address:{2}</p><p>Thanks,{3}.</p>", master.GetFullName(), master.Email_Login, profileUrl, AppSettings.APP_TITLE); return(SendEmail(master.Email_Login, subject, body)); }