private void SendVerifyEmail(string email, string type, Int64 id) { try { string desctr = Encryption.EncryptURL(id + "," + type); desctr = desctr.Replace("/", "_").Replace("+", "-"); // var sanitized = HttpUtility.UrlEncode(Desctr); //HttpServerUtility.UrlTokenEncode(Desctr); string sanitized = HttpUtility.UrlEncode(desctr); string body = Common.ReadEmailformats("signup.html"); string path = _siteUrl + "/webapp/accountactivate/" + sanitized; body = body.Replace("$$UserEmailId$$", email); body = body.Replace("$$SignUpLink$$", "<a href='" + path + "'> Click here to verify your email </a>"); var objSendMail = new SendMail(); string response = objSendMail.SendEmail(email, AppSettingHelper.GetAdminEmail(), "Account Created", body, ""); } catch (Exception e) { } }
public string SubscribeNewsLetter(ReqNewsLetter objnewsLetter) { string rst = "0"; if (!string.IsNullOrWhiteSpace(objnewsLetter.email)) { try { string body = Common.ReadEmailformats("newsletter.html"); body = body.Replace("$$UserEmailId$$", objnewsLetter.email); var objSendMail = new SendMail(); objSendMail.SendEmail(objnewsLetter.email, AppSettingHelper.GetAdminEmail(), "Account Created", body, ""); rst = "1"; } catch { } } return rst; }