Browse Source

[WHAT] 後台新增使用者時寄出之信件內容調整 [WHY] feature

Dev
Janie 2 years ago
parent
commit
fd1d2660fd
  1. 48
      EuroTran/EasyBL.WEBAPP/SYS/MembersMaintain_UpdService.cs

48
EuroTran/EasyBL.WEBAPP/SYS/MembersMaintain_UpdService.cs

@ -1,4 +1,5 @@
using EasyBL.WebApi.Message;
using EasyBL.WEBAPP.ShowEasy;
using EasyNet;
using Entity.Sugar;
using Entity.ViewModels;
@ -9,6 +10,7 @@ using SqlSugar.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EasyBL.WEBAPP.WSM
{
@ -130,9 +132,9 @@ namespace EasyBL.WEBAPP.WSM
Type = "to"
};
toEmail.Add(oEmailTo);
oEmail.FromUserName = "系統自動發送";//取fonfig
oEmail.Title = "奕達運通管理系統信息派送";//取fonfig
oEmail.EmailBody = "新密碼為:123456";
oEmail.FromUserName = "No-Reply@showeasy.com";//取fonfig
oEmail.Title = "ShowEasy 帳號成功建立";//取fonfig
oEmail.EmailBody = NewMember(oEntity.MemberID, oEntity.MemberName);
oEmail.IsCCSelf = false;
oEmail.Attachments = null;
oEmail.EmailTo = toEmail;
@ -462,5 +464,45 @@ namespace EasyBL.WEBAPP.WSM
}
#endregion 帳號管理(查詢筆數)
//newMemberMail
private string NewMember(string MemberID, string MemberName)
{
StringBuilder sb = new StringBuilder();
EmailTemplate mailTemplate = new EmailTemplate();
sb.Append(mailTemplate.MailHeader());
sb.Append(mailTemplate.MailCSS());
//Email Body
sb.Append("<body width = \"100%\" style = \"margin: 0; padding: 0 !important;background: #f8f8f8;mso-line-height-rule: exactly;\"> ");
sb.Append("<center style=\"width: 100 %; background: #f8f8f8\">");
sb.Append("<div class=\"email-container\" style=\"max-width: 500px; margin: 0 auto\">");
sb.Append("<tr>");
sb.Append("<td style=\"padding-top: 20px; padding-bottom: 20px\" class=\"sm-p\">");
sb.Append("<table align = \"left\" border = \"0\" cellpadding = \"0\" cellspacing = \"0\" role = \"presentation\" width = \"100%\"> ");
sb.Append("<tr>");
sb.Append("<td style=\"display: block; color: #232323; text-align: left\">");
sb.Append("<h1 style = \"text-align: left;font-family: 'Arial', 'sans-serif';font-weight: 400;font-size: 18px;line-height: 30px;color: #232323;margin: 0 0 0 0;\"> ");
sb.Append("Hello, " + MemberName + "<br />");
sb.Append("您的帳號已成功建立<br />");
sb.Append("帳號:" + MemberID + "<br />");
sb.Append("預設密碼:123456 (請登入後前往個人設定中更改)<br />");
sb.Append("</h1>");
sb.Append("</td>");
sb.Append("</tr>");
sb.Append("</table>");
sb.Append("</td>");
sb.Append("</tr>");
sb.Append("</table>");
sb.Append("</div>");
sb.Append("</center>");
sb.Append("</body>");
sb.Append("</html>");
return sb.ToString();
}
}
}
Loading…
Cancel
Save