修改邮件格式测试

Uat_Study
hang 2022-05-19 14:50:43 +08:00
parent 7f40175a40
commit bdcc2fa0e2
1 changed files with 122 additions and 36 deletions

View File

@ -46,18 +46,37 @@ namespace IRaCIS.Application.Services
//主题
messageToSend.Subject = "[来自展影IRC] 关于重置邮箱的提醒";
messageToSend.Body = new TextPart("plain")
{
Text = $@"尊敬的{userName},您好:
使
: {verificationCode}3
var builder = new BodyBuilder();
/Best Regards.
"
builder.HtmlBody = @$"<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;padding-bottom:40px'>
<div style='line-height: 40px;font-size: 18px'>
{userName},
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
使
</div>
<div>
: {verificationCode}3
</div>
<div>
</div>
<div>
/Best Regards
</div>
<div>
</div>
</div>
</div>
</body>";
};
messageToSend.Body = builder.ToMessageBody();
EventHandler<MessageSentEventArgs> sucessHandle = (sender, args) =>
{
@ -92,16 +111,38 @@ namespace IRaCIS.Application.Services
//主题
messageToSend.Subject = "[来自展影IRC] 关于重置密码的提醒";
messageToSend.Body = new TextPart("plain")
{
Text = $@"您好:
使
: {verificationCode}3
/Best Regards.
"
};
var builder = new BodyBuilder();
builder.HtmlBody = @$"<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;padding-bottom:40px'>
<div style='line-height: 40px;font-size: 18px'>
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
使
</div>
<div>
: {verificationCode}3
</div>
<div>
</div>
<div>
/Best Regards
</div>
<div>
</div>
</div>
</div>
</body>";
messageToSend.Body = builder.ToMessageBody();
EventHandler<MessageSentEventArgs> sucessHandle = (sender, args) =>
{
@ -136,16 +177,39 @@ namespace IRaCIS.Application.Services
//主题
messageToSend.Subject = $"[来自展影IRC] [{researchProgramNo}] 关于中心调研的提醒";
messageToSend.Body = new TextPart("plain")
{
Text = $@"尊敬的用户,您好:
使
IRC: {verificationCode}3
/Best Regards.
"
};
var builder = new BodyBuilder();
builder.HtmlBody = @$"<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;padding-bottom:40px'>
<div style='line-height: 40px;font-size: 18px'>
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
使
</div>
<div>
IRC: {verificationCode}3
</div>
<div>
</div>
<div>
/Best Regards
</div>
<div>
</div>
</div>
</div>
</body>";
messageToSend.Body = builder.ToMessageBody();
EventHandler<MessageSentEventArgs> sucessHandle = (sender, args) =>
@ -187,16 +251,38 @@ namespace IRaCIS.Application.Services
//主题
messageToSend.Subject = "[来自展影IRC] 关于重置邮箱的提醒";
messageToSend.Body = new TextPart("plain")
{
Text = $@"尊敬的{userName},您好:
使
: {verificationCode}3
/Best Regards.
"
};
var builder = new BodyBuilder();
builder.HtmlBody = @$"<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;padding-bottom:40px'>
<div style='line-height: 40px;font-size: 18px'>
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
使
</div>
<div>
: {verificationCode}3
</div>
<div>
</div>
<div>
/Best Regards
</div>
<div>
</div>
</div>
</div>
</body>";
messageToSend.Body = builder.ToMessageBody();
EventHandler<MessageSentEventArgs> sucessHandle = (sender, args) =>
{