/// <summary> /// 判断邮箱账号是否存在 /// </summary> /// <param name="email">邮箱账号</param> /// <param name="error"></param> /// <returns></returns> public static bool IsExist(string email, ref string error) { Hashtable ht = new Hashtable(); //Hashtable 为webservice所需要的参数集 ht.Add("account", email); string xx = QGYHelper.WebServiceCaller.QueryPostWebService(QGYHelper.Config._emailAPI, "IsEmail1", ht); EmailReturn EmailReturn = new EmailReturn(); EmailReturn = (EmailReturn)Newtonsoft.Json.JsonConvert.DeserializeObject(xx, typeof(EmailReturn)); string result = EmailReturn.result; error = QGYHelper.FormatCode.FormatUrlDecode(EmailReturn.error); if (result == "0") { return(false); } return(true); }
/// <summary> /// 店铺开通流程中发送确认邮箱的邮件 /// </summary> /// <param name="userid">学生id</param> /// <param name="account">学生账户</param> /// <param name="trainingid">实训id</param> /// <param name="traintype">实训类型</param> /// <param name="store_model">店铺对象</param> /// <param name="error">错误信息</param> /// <returns></returns> public static bool SendEmail(string theme, string content, string toEmail, string fromEmail, ref string error) { Hashtable ht = new Hashtable(); //Hashtable 为webservice所需要的参数集 ht.Add("theme", theme); ht.Add("content", content); ht.Add("toEmail", toEmail); ht.Add("fromEmail", fromEmail); string xx = QGYHelper.WebServiceCaller.QueryPostWebService(QGYHelper.Config._emailAPI, "Send", ht); EmailReturn EmailReturn = new EmailReturn(); EmailReturn = (EmailReturn)Newtonsoft.Json.JsonConvert.DeserializeObject(xx, typeof(EmailReturn)); string result = EmailReturn.result; error = QGYHelper.FormatCode.FormatUrlDecode(EmailReturn.error); if (result == "0") { return(false); } return(true); }