From fd1d2660fd5b1b25bcfb5699d3f85e8e5ae2b4df Mon Sep 17 00:00:00 2001 From: Janie <109517022+Janie06@users.noreply.github.com> Date: Thu, 12 Jan 2023 15:29:53 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E5=BE=8C=E5=8F=B0=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=80=85=E6=99=82=E5=AF=84=E5=87=BA=E4=B9=8B?= =?UTF-8?q?=E4=BF=A1=E4=BB=B6=E5=85=A7=E5=AE=B9=E8=AA=BF=E6=95=B4=20[WHY]?= =?UTF-8?q?=20feature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SYS/MembersMaintain_UpdService.cs | 48 +++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/EuroTran/EasyBL.WEBAPP/SYS/MembersMaintain_UpdService.cs b/EuroTran/EasyBL.WEBAPP/SYS/MembersMaintain_UpdService.cs index a9337f2..4a52c5b 100644 --- a/EuroTran/EasyBL.WEBAPP/SYS/MembersMaintain_UpdService.cs +++ b/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(" "); + sb.Append("
"); + sb.Append("
"); + sb.Append(""); + sb.Append(""); + sb.Append(" "); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append("
"); + sb.Append("

"); + sb.Append("Hello, " + MemberName + "
"); + sb.Append("您的帳號已成功建立
"); + sb.Append("帳號:" + MemberID + "
"); + sb.Append("預設密碼:123456 (請登入後前往個人設定中更改)
"); + sb.Append("

"); + sb.Append("
"); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append("
"); + sb.Append("
"); + sb.Append(""); + sb.Append(""); + + return sb.ToString(); + + } } } \ No newline at end of file