public static string EmailView(string User_Code, string CG_Code, string filename) { string strLine = string.Empty; BL_Campaign Cam = new BL_Campaign(); DataTable dt_query = Cam.getfile_Rep_value(int.Parse(CG_Code), AU_Type, AU_AD_OM_Code); DataTable User_Dt = Parameter_Replace.getUser_value(dt_query, User_Code); DataTable Tag_Dt = Cam.getCam_tags(); string strPath = System.Configuration.ConfigurationManager.AppSettings["FileUploadPath"]; strLine = ShInfoTech.Common.Files.FileContext(strPath, filename); strLine = Parameter_Replace.ReplaceContents(strLine, Tag_Dt, User_Dt); return(strLine); }
public static string sendEmail(string email, string User_Code, string CG_Code, string filename) { string strLine = string.Empty; BL_Campaign Cam = new BL_Campaign(); DataTable dt_query = Cam.getfile_Rep_value(int.Parse(CG_Code), AU_Type, AU_AD_OM_Code); DataTable User_Dt = Parameter_Replace.getUser_value(dt_query, User_Code); DataTable Tag_Dt = Cam.getCam_tags(); string strPath = System.Configuration.ConfigurationManager.AppSettings["FileUploadPath"]; strLine = ShInfoTech.Common.Files.FileContext(strPath, filename); strLine = Parameter_Replace.ReplaceContents(strLine, Tag_Dt, User_Dt); if (string.IsNullOrEmpty(strLine)) { return("-1"); } bool isSur = Mail.SendMail("*****@*****.**", "CRMTree_Mail", strLine, null, "*****@*****.**", "shinfotech", "*****@*****.**", "mail.shinfotech.cn"); if (!isSur) { return("-2"); } return("0"); }