private void MailTemplateProcess(string username) { //if sending mail option enabled if (Config.isEmailEnabled()) { string emailaddress = members.Return_Value(username, "email"); System.Collections.Generic.List <Struct_MailTemplates> lst = MailTemplateBLL.Get_Record("USRPRIVCHN"); if (lst.Count > 0) { string subject = MailProcess.Process2(lst[0].Subject, "\\[username\\]", username); string contents = MailProcess.Process2(lst[0].Contents, "\\[username\\]", username); MailProcess.Send_Mail(emailaddress, subject, contents); } } }
private void MailTemplateProcess(string emailaddress, string username, string url) { //if sending mail option enabled if (Config.isEmailEnabled()) { System.Collections.Generic.List <Struct_MailTemplates> lst = MailTemplateBLL.Get_Record("FORPASS"); if (lst.Count > 0) { string subject = MailProcess.Process2(lst[0].Subject, "\\[username\\]", username); string contents = MailProcess.Process2(lst[0].Contents, "\\[username\\]", username); contents = MailProcess.Process2(contents, "\\[url\\]", url); MailProcess.Send_Mail(emailaddress, subject, contents); } } }
// mail processing private void MailTemplateProcess(string emailaddress, string username, string password, string key) { //if sending mail option enabled if (Config.isEmailEnabled()) { System.Collections.Generic.List <Struct_MailTemplates> lst = MailTemplateBLL.Get_Record("USRREG"); if (lst.Count > 0) { string subject = MailProcess.Process2(lst[0].Subject, "\\[username\\]", username); string contents = MailProcess.Process2(lst[0].Contents, "\\[username\\]", username); contents = MailProcess.Process2(contents, "\\[password\\]", password); string validation_url = Config.GetUrl("validate.aspx?key=" + key.Trim() + "&user="******"<a href=\"" + validation_url + "\">" + validation_url + "</a>"; contents = MailProcess.Process2(contents, "\\[key_url\\]", url); MailProcess.Send_Mail(emailaddress, subject, contents); } } }
// send mail to admin when new content added by user public static void Admin_New_Content_Added(string username, string contenttype, string url) { //if sending mail option enabled if (Config.isEmailEnabled()) { System.Collections.Generic.List <Struct_MailTemplates> lst = MailTemplateBLL.Get_Record("USRAPRCNT"); if (lst.Count > 0) { string subject = MailProcess.Process2(lst[0].Subject, "\\[username\\]", username); subject = MailProcess.Process2(subject, "\\[contenttype\\]", contenttype); string contents = MailProcess.Process2(lst[0].Contents, "\\[username\\]", username); subject = MailProcess.Process2(subject, "\\[contenttype\\]", contenttype); contents = MailProcess.Process2(contents, "\\[url\\]", url); string emailaddress = Site_Settings.Admin_Mail; MailProcess.Send_Mail(emailaddress, subject, contents); } } }
// ****************************** // Mail Templates // ****************************** // send mail to user when admin approved user posted content public static void User_Mail_Content_Action(string username, string contenttype, string url, string status) { //if sending mail option enabled if (Config.isEmailEnabled()) { System.Collections.Generic.List <Struct_MailTemplates> lst = MailTemplateBLL.Get_Record("USRCNTAPP"); if (lst.Count > 0) { string subject = MailProcess.Process2(lst[0].Subject, "\\[username\\]", username); subject = MailProcess.Process2(subject, "\\[status\\]", status); subject = MailProcess.Process2(subject, "\\[contenttype\\]", contenttype); string contents = MailProcess.Process2(lst[0].Contents, "\\[username\\]", username); contents = MailProcess.Process2(contents, "\\[contenttype\\]", contenttype); contents = MailProcess.Process2(contents, "\\[url\\]", url); contents = MailProcess.Process2(contents, "\\[status\\]", status); string emailaddress = members.Return_Value(username, "email"); MailProcess.Send_Mail(emailaddress, subject, contents); } } }