Ejemplo n.º 1
0
 /// <summary>
 /// 发邮件 返回1则发送成功
 /// </summary>
 /// <param name="securityCode"></param>
 /// <param name="EtoAddress"></param>
 private int SendEmail(string securityCode, string[] EtoAddress)
 {
     var emailModel = new UserMessageEmailService().QueryByID(1);//查询出来要发送的邮件内容
     string content = emailModel.Content.Replace("{code}", securityCode);
     var emailClient = new EmailClient();
     if (emailClient.EmailSend(EtoAddress, emailModel.Title, content, "1") == "1")
     {
         return 1;
     }
     return -1;
 }