public static bool SMS(Confess confess) { string Url = string.Format("http://www.justsay.cn/confess/Details/{0}", confess.ID); SmsStatus status = SMSHelper.SendMsg(confess.ToPhone, string.Format(ConfessSMSTemplete, confess.ToName, Url)); if (!status.IsSuccess) { ToDoListBusiness.WriteLog(status.ErrorMessage, "短信异常", "SMSHelper.SendMsg", true); return false; } return status.IsSuccess; // return true; }
public static bool Email(Confess confess) { string Url = string.Format("http://www.justsay.cn/confess/Details/{0}", confess.ID); string msg = SMTPManager.MailSending(confess.ToEmail,confess.ToName+"你被人表白了", string.Format(ConfessEmailTemplete,confess.ToName,confess.Content,Url), "", 0); if (msg != "发送成功") { ToDoListBusiness.WriteLog(msg, "邮箱异常", "SMTPManager.MailSending", true); return false; } return true; }