/// <summary>
 /// 寄信
 /// </summary>
 /// <param name="mailEntity"></param>
 public void SendMail(SendMailModel mailEntity)
 {
     try
     {
         string sendMailFrom = string.IsNullOrEmpty(mailEntity.SendMailFrom) ? m_MailVO.SendEmail : mailEntity.SendMailFrom;
         m_MailService.SendMail(sendMailFrom, mailEntity.SendMailTo, mailEntity.SendMailTitle, mailEntity.SendMailContent);
     }
     catch (Exception ex)
     {
         m_Log.Error(ex);
     }
 }
 public ActionResult SendMail(SendMailModel model, string id)
 {
     ActivityModel entityModel = new ActivityModel(id);
     string captcha = AccountUtil.GetCaptcha();
     if (!captcha.Equals(model.SendMailConfirmationCode, StringComparison.OrdinalIgnoreCase))
     {                
         ModelState.AddModelError(string.Empty, "驗證碼錯誤");
     }
     else
     {
         model.SendMailTitle = string.Format("收到一封由【{0}】從產業永續發展整合資訊網的轉寄信:{1}。"
             , model.SendMailName, entityModel.Name);
         model.SendMailContent += entityModel.Content;
         model.SendMail();
         EntityCounter(id, "Emailer");
         ViewData["SendMailOk"] = true;
     }
     return View("Email", entityModel);
 }
Beispiel #3
0
        public void ForgetPass()
        {
            Member member = m_FTISService.GetMemberByLoginId(this.LoginId);

            if (member == null || member.Email != this.Email || member.Status == "0")
            {
                this.SendOrderOk = false;
                this.ErrorMsg    = "帳號錯誤";
                return;
            }

            SendMailModel sendMailModel = new SendMailModel();

            sendMailModel.SendMailTitle   = "收到一封從產業永續發展整合資訊網的忘記密碼信。";
            sendMailModel.SendMailContent = string.Format("{0}您好,您的密碼為{1}", member.LoginId, member.Password);
            sendMailModel.SendMailTo      = member.Email;
            sendMailModel.SendMail();

            this.SendOrderOk = true;
            this.ErrorMsg    = string.Empty;
            this.Msg         = "您的密碼已寄發至註冊信箱中";
        }
Beispiel #4
0
        public void ForgetPass()
        {
            Member member = m_FTISService.GetMemberByLoginId(this.LoginId);
            if (member == null || member.Email != this.Email || member.Status == "0")
            {
                this.SendOrderOk = false;
                this.ErrorMsg = "帳號錯誤";
                return;
            }

            SendMailModel sendMailModel = new SendMailModel();
            sendMailModel.SendMailTitle = "收到一封從產業永續發展整合資訊網的忘記密碼信。";
            sendMailModel.SendMailContent = string.Format("{0}您好,您的密碼為{1}", member.LoginId, member.Password);
            sendMailModel.SendMailTo = member.Email;
            sendMailModel.SendMail();

            this.SendOrderOk = true;
            this.ErrorMsg = string.Empty;
            this.Msg = "您的密碼已寄發至註冊信箱中";
        }