private static void BuildSubmitMailBody(TraineeApplication traineeApplication,
                                                MailBody mailBody, Account to, bool addConfirmAddress)
        {
            string        subject     = string.Format("{0}Ìá½»ÅàѵÉêÇ룬ÇëÉóÅú", traineeApplication.Applicant.Name);
            StringBuilder mailContent = new StringBuilder();

            mailContent.Append(TraineeApplicationMail.BuildBody(traineeApplication));
            if (addConfirmAddress)
            {
                TraineeApplicationMail.BulidConfirmAddress(mailContent, to, traineeApplication.PKID);
            }
            mailBody.Body       = mailContent.ToString();
            mailBody.Subject    = subject;
            mailBody.IsHtmlBody = true;
        }
示例#2
0
        private void BuildSubmitMailBody(MailBody mailBody, Account to, bool addConfirmAddress)
        {
            string        subject     = string.Format("ÇëÉóÅú{0}µÄÅàѵÉêÇë", _TraineeApplication.Applicant.Name);
            StringBuilder mailContent = new StringBuilder();

            mailContent.Append(TraineeApplicationMail.BuildBody(_TraineeApplication));
            if (addConfirmAddress)
            {
                TraineeApplicationMail.BulidConfirmAddress(mailContent, to,
                                                           _TraineeApplication.PKID);
                mailBody.MailTo = TraineeApplicationUtility.GetMail(to);
            }
            mailBody.Body       = mailContent.ToString();
            mailBody.Subject    = subject;
            mailBody.IsHtmlBody = true;
        }
 /// <summary>
 /// 发送审核结束邮件
 /// </summary>
 public void ConfirmOverMail()
 {
     if (_TraineeApplication.TraineeApplicationStatuss.Id == TraineeApplicationStatus.ApproveFail.Id ||
         _TraineeApplication.TraineeApplicationStatuss.Id == TraineeApplicationStatus.ApprovePass.Id)
     {
         MailBody mailBody = new MailBody();
         mailBody.Subject =
             string.Format("{2}{1}{0}的培训申请单", _TraineeApplication.Applicant.Name,
                           TraineeApplicationUtility.TraineeApplicationStatusDisplay(_TraineeApplication.TraineeApplicationStatuss),
                           _CurrentAccount.Name);
         StringBuilder body = new StringBuilder();
         body.AppendFormat(TraineeApplicationMail.BuildBody(_TraineeApplication));
         mailBody.Body       = body.ToString();
         mailBody.IsHtmlBody = true;
         mailBody.MailTo     = TraineeApplicationUtility.GetMail(_TraineeApplication.Applicant);
         mailBody.MailCc     = SendMailToMailCC();
         if (_TraineeApplication.TraineeApplicationStatuss.Id == TraineeApplicationStatus.ApprovePass.Id)
         {
             mailBody.MailCc.AddRange(SendMailToHRMailCC());
         }
         _MailGateWay.Send(mailBody);
     }
 }