评论邮件通知模版:Twikoo & Waline

主要是记录评论邮件通知模版,之前经常失效,想着直接记录下来,以备日后使用,资源内容参考Heo葱苓samaCC康纳百川

Twikoo

邮件样式

代码

MAIL_SUBJECT

1
您在 Hwe博客 上发表的评论,收到了来自 博主 的回复

MAIL_TEMPLATE
1
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title></head><body><div><div style="display:flex;position:relative;width:100%;height:206px;background:#ef859d2e;top:0;left:0; justify-content:center; border-radius: 10px 10px 0 0;"><div style="background-image: url(https://cdn.cbd.int/imgbed-npm@2.0.6/blog/appstore.ico);position: absolute; width: 152px;height: 152px; display: flex; top:130px;background-size: cover;border-radius: 50%;border: 5px solid rgb(0, 255, 255);"></div>       <div style="border-radius: 100%; background-color: #6bdf8f; width: 35px; height: 35px; position: absolute; border: 6px solid #fff; top: 96%; left: 49.6%; transform: translate(35px,45px);"></div></div><div style="margin-top:92px;display:flex;flex-direction:column; border-radius: 0 0 10px 10px;"><div style="display:flex;flex-direction:column; margin: 0 20px;"><span style="font-size: 26px;         font-family: PingFang-SC-Bold,PingFang-SC;font-weight: bold;color: #000000;line-height: 37px;         text-align: center;">嘿!你在&nbsp;${SITE_NAME}&nbsp;收到一条新回复。</span><span class="text_2" style=" font-size: 16px;font-family: PingFang-SC-Bold, PingFang-SC;font-weight: bold; color: #00000030;         line-height: 22px; margin-top: 21px;text-align: center;">你之前的评论&nbsp;&nbsp;${SITE_NAME} 收到来自&nbsp;${NICK}&nbsp;的回复</span></div><div style="margin: 0 10px;min-height: 128px;background: #F7F7F7;border-radius: 12px;margin-top: 34px;display: flex;flex-direction: column;padding: 32px 16px;         width: calc(100% - 40px);"><div style="display:flex; margin-bottom:10px;"><span style="display:flex; flex-direction:column; margin-left:10.6px;"><span style="height:22px; font-size:16px; font-family:PingFang-SC-Bold, PingFang-SC; font-weight:bold; color:#C5343E; line-height:22px;">${PARENT_NICK}</span><span style="margin-top:6px; margin-right:22px; font-size:16px; font-family:PingFangSC-Regular,PingFang SC; font-weight:400; color:#000000; line-height:22px; padding:5px 10px;border-radius:6px;">${PARENT_COMMENT}</span></span></div><hr style="display:flex; position:relative; box-sizing:content-box; height:0px; overflow:visible; width:100%; border: 1px dashed #ef859d2e;">         <div style="display:flex; right:0; justify-content:flex-end; margin: 15px 0 20px;"><span style="display:flex; flex-direction:column;"><span style="height:22px; font-size:16px; font-weight:bold; color:#C5343E; line-height:22px; font-family:Arial,PingFang-SC-Bold,PingFang-SC; text-align:right;">${NICK}</span><span style="margin-top:6px; font-size:16px; font-family:PingFangSC-Regular,PingFang SC; font-weight:400; color:#000000; line-height:22px; padding:5px 10px; border-radius:6px;">${COMMENT}</span> </span></div><a style="min-width: 106px;height: 38px;background: #ef859d38;border-radius: 32px;         display: flex;         align-items: center;         justify-content: center;         text-decoration: none;         margin: 32px auto 0;" href="${POST_URL}">           <span style="color: #DB214B;">查看详情</span>         </a>       </div>        <div style="         display: flex;         flex-direction: column;         align-items: center;         margin-top: 34px;">         <span style="         height: 17px;         font-size: 12px;         font-family: PingFangSC-Regular, PingFang SC;         font-weight: 400;         color: #00000045;         line-height: 17px;">此邮件由评论服务自动发出,直接回复无效。</span>         <a class="text_7" style="height:17px; font-size:12px; font-family:PingFangSC-Regular,PingFang SC; font-weight:400; color:#DB214B; line-height:17px; margin-top:6px; text-decoration:none;" href="${SITE_URL}">前往博客</a>       </div>     </div>    </div>  </body>  </html>

MAIL_SUBJECT_ADMIN
1
Hwe博客上收到了新的的评论

MAIL_TEMPLATE_ADMIN
1
<!DOCTYPE html> <html lang="zh-CN">  <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <title>Document</title> </head>  <body>    <div>      <div style="       display:flex;       position:relative;       width:100%;       height:206px;       background:#ef859d2e;       top:0;       left:0;       justify-content:center;       border-radius: 10px 10px 0 0;">       <div style="         position:absolute; background-image: url(https://cdn.cbd.int/imgbed-npm@2.0.6/blog/appstore.ico);         width: 152px;         height: 152px;         display: flex;         top: 130px;         background-size: cover;         border-radius: 50%;         border: 5px solid rgb(0, 255, 255);">       </div>       <div style="         border-radius: 100%;         background-color: #6bdf8f;         width: 35px;         height: 35px;         position: absolute;         border: 6px solid #fff;         top: 96%;         left: 49.6%;         transform: translate(35px, 45px);"></div>     </div>      <div style="margin-top:92px; display:flex; flex-direction:column; border-radius: 0 0 10px 10px;">        <div style="         display: flex;         flex-direction: column;         margin: 0 20px;">         <span style="           font-size: 26px;           font-family: PingFang-SC-Bold, PingFang-SC;           font-weight: bold;           color: #000000;           line-height: 37px;           text-align: center;">${SITE_NAME}&nbsp;有新评论了。</span>         <span style="           font-size: 16px;           font-family: PingFang-SC-Bold, PingFang-SC;           font-weight: bold;           color: #00000030;           line-height: 22px;           margin-top: 21px;           text-align: center;">${SITE_NAME}&nbsp;收到了来自&nbsp;${NICK}&nbsp;的新评论。</span>       </div>        <div style="         margin: 0 10px;         min-height: 128px;         background: #F7F7F7;         border-radius: 12px;         margin-top: 34px;         display: flex;         flex-direction: column;         padding: 32px 16px;         width: calc(100% - 40px);">         <div style="           display: flex;           margin: 15px 0 20px;           width: 100%;">           <div style="             display: flex;             flex-direction: column;             margin-left: 10.6px;">             <span style="               height: 22px;               font-size: 16px;               font-weight: bold;               color: #C5343E;               line-height: 22px;               font-family: Arial, PingFang-SC-Bold, PingFang-SC;">${NICK}</span>             <span style="               margin-top: 6px;               font-size: 16px;               font-family: PingFangSC-Regular, PingFang SC;               font-weight: 400;               color: #000000;               line-height: 22px;               padding: 5px 10px;               border-radius: 6px;">${COMMENT}</span>           </div>         </div>         <a style="           min-width: 106px;           height: 38px;           background: #ef859d38;           border-radius: 32px;           display: flex;           align-items: center;           justify-content: center;           text-decoration: none;           margin: 32px auto 0;" href="${POST_URL}">           <span style="color: #DB214B;">查看详情</span></a>       </div>        <div style="         display: flex;         flex-direction: column;         align-items: center;         margin-top: 34px;">         <span style="           height: 17px;           font-size: 12px;           font-family: PingFangSC-Regular, PingFang SC;           font-weight: 400;           color: #00000045;           line-height: 17px;">此邮件由评论服务自动发出,直接回复无效。</span>         <a style="           height: 17px;           font-size: 12px;           font-family: PingFangSC-Regular, PingFang SC;           font-weight: 400;           color: #DB214B;           line-height: 17px;           margin-top: 6px;           text-decoration: none;" href="${SITE_URL}">前往博客</a>       </div>     </div>   </div>  </body>  </html>

Waline

邮件样式

暂无

代码

1
2
3
4
mailSubject: '{{parent.nick}},您在 {{site.name}} 上发表的评论,收到了来自 {{self.nick}} 的回复',
mailSubjectAdmin: '{{site.name}} 上收到了来自 {{self.nick}} 的留言',
mailTemplate: '<head><base target="_blank"/><style id="scrollbar"type="text/css">::-webkit-scrollbar{width:0!important}pre{white-space:pre-wrap!important;word-wrap:break-word!important;*white-space:normal!important}pre{white-space:pre-wrap!important;word-wrap:break-word!important;*white-space:normal!important}#letter img{max-width:300px}</style><style id="from-wrapstyle"type="text/css">#form-wrap{overflow:hidden;height:447px;position:relative;top:0px;transition:all 1s ease-in-out.3s;z-index:0}</style><style id="from-wraphoverstyle"type="text/css">#form-wrap:hover{height:1300px;top:-200px}</style></head><body><div style="width: 530px;margin: 20px auto 0;height: 1000px;"><div id="form-wrap"><img src="https://cdn.jsdelivr.net/gh/Akilarlxh/Valine-Admin@v1.0/source/img/before.png"alt="before"style="position: absolute;bottom: 126px;left: 0px;background-repeat: no-repeat;width: 530px;height: 317px;z-index:-100"><div style="position: relative;overflow: visible;height: 1500px;width: 500px;margin: 0px auto;transition: all 1s ease-in-out .3s;padding-top:200px;"<form><div style="background: white;width: 95%;max-width: 800px;margin: auto auto;border-radius: 5px;border: 1px solid;overflow: hidden;-webkit-box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.12);box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.18);"><img style="width:100%;overflow: hidden;"src="https://area.sinaapp.com/bingImg"/><div style="padding: 5px 20px;"><br><div><h3 style="text-decoration: none; color: #8fbc8f;">{{parent.nick}},见信安:</h3></div><br><div id="letter"style="overflow:auto;height:300px;width:100%;display:block;word-break: break-all;word-wrap: break-word;"><p style="display: inline-block;">您在<a style="text-decoration: none;color: #8fbc8f"target="_blank"href="{{site.postUrl}} display: inline-block;">{{site.name}}</a>上发表的评论:</p><div style="border-bottom: #ddd 1px solid;border-left: #ddd 1px solid;padding-bottom: 20px;background-color: #eee;margin: 15px 0px;padding-left: 20px;padding-right: 20px;border-top: #ddd 1px solid;border-right: #ddd 1px solid;padding-top: 20px;font-family: "Arial", "Microsoft YaHei" , "黑体" , "宋体" , sans-serif;">{{parent.comment | safe}}</div><p>收到了来自{{self.nick}}的回复:</p><div style="border-bottom: #ddd 1px solid;border-left: #ddd 1px solid;padding-bottom: 20px;background-color: #eee;margin: 15px 0px;padding-left: 20px;padding-right: 20px;border-top: #ddd 1px solid;border-right: #ddd 1px solid;padding-top: 20px;font-family: "Arial", "Microsoft YaHei" , "黑体" , "宋体" , sans-serif;">{{self.comment | safe}}</div></div><br><div style="text-align: center;margin-top: 40px;"><img src="https://ae01.alicdn.com/kf/U0968ee80fd5c4f05a02bdda9709b041eE.png"alt="hr"style="width:100%; margin:5px auto 5px auto; display: block;"/><a style="text-transform: uppercase;text-decoration: none;font-size: 14px;border: 2px solid #ace0f9;color: #FFFFFF;padding: 10px;display: inline-block;margin: 10px auto 0;background-color: #8fbc8f;"target="_blank"href="{{site.postUrl}}">{{site.name}}|请您签收~</a></div><p style="font-size: 12px;text-align: center;color: #999;">自动书记人偶竭诚为您服务!<br>©2020 - 2021 <a style="text-decoration:none; color:#8fbc8f"href="{{site.url}}">{{site.name}}</a></p></div></div></form></div><img src="https://cdn.jsdelivr.net/gh/Akilarlxh/Valine-Admin@v1.0/source/img/after.png"alt="after"style=" position: absolute;bottom: -2px;left: 0;background-repeat: no-repeat;width: 530px;height: 259px;z-index:100"></div></div></body>',
mailTemplateAdmin: '<head><base target="_blank"/><style id="scrollbar"type="text/css">::-webkit-scrollbar{width:0!important}pre{white-space:pre-wrap!important;word-wrap:break-word!important;*white-space:normal!important}#letter img{max-width:300px}</style><style id="from-wrapstyle"type="text/css">#form-wrap{overflow:hidden;height:447px;position:relative;top:0px;transition:all 1s ease-in-out.3s;z-index:0}</style><style id="from-wraphoverstyle"type="text/css">#form-wrap:hover{height:1300px;top:-200px}</style></head><body><div style="width: 530px;margin: 20px auto 0;height: 1000px;"><div id="form-wrap"><img src="https://cdn.jsdelivr.net/gh/Akilarlxh/Valine-Admin@v1.0/source/img/before.png"alt="before"style="position: absolute;bottom: 126px;left: 0px;background-repeat: no-repeat;width: 530px;height: 317px;z-index:-100"><div style="position: relative;overflow: visible;height: 1500px;width: 500px;margin: 0px auto;transition: all 1s ease-in-out .3s;padding-top:200px;"><form><div style="background: white;width: 95%;max-width: 800px;margin: auto auto;border-radius: 5px;border: 1px solid;overflow: hidden;-webkit-box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.12);box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.18);"><img style="width:100%;overflow: hidden;"src="https://area.sinaapp.com/bingImg"/><div style="padding: 5px 20px;"><br><div><h3 style="text-decoration: none; color: #8fbc8f;">来自{{self.nick}}的留言:</h3></div><br><br><div id="letter"style="overflow:auto;height:300px;width:100%;display:block;word-break: break-all;word-wrap: break-word;"><div style="border-bottom: #ddd 1px solid;border-left: #ddd 1px solid;padding-bottom: 20px;background-color: #eee;margin: 15px 0px;padding-left: 20px;padding-right: 20px;border-top: #ddd 1px solid;border-right: #ddd 1px solid;padding-top: 20px;font-family: "Arial", "Microsoft YaHei" , "黑体" , "宋体" , sans-serif;">{{self.comment | safe}}</div></div><div style="text-align: center;margin-top: 40px;"><img src="https://ae01.alicdn.com/kf/U0968ee80fd5c4f05a02bdda9709b041eE.png"alt="hr"style="width:100%; margin:5px auto 5px auto; display: block;"/><a style="text-transform: uppercase;text-decoration: none;font-size: 14px;border: 2px solid #ace0f9;color: #FFFFFF;padding: 10px;display: inline-block;margin: 10px auto 0;background-color: #8fbc8f;"target="_blank"href="{{site.postUrl}}">{{site.name}}|请您过目~</a></div><p style="font-size: 12px;text-align: center;color: #999;">©2020 - 2021 <a style="text-decoration:none; color:#8fbc8f"href="{{site.url}}">{{site.name}}</a></p></div></div></form></div><img src="https://cdn.jsdelivr.net/gh/Akilarlxh/Valine-Admin@v1.0/source/img/after.png"alt="after"style=" position: absolute;bottom: -2px;left: 0;background-repeat: no-repeat;width: 530px;height: 259px;z-index:100"></div></div></body>'

以上代码需要配置到环境中使用

TG代码

1
2
3
4
💬 _[{{site.name}}]({{site.url}}) 有新评论啦_

_{{self.nick}}_ 回复说:

1
2
3
4
5
6

{{-self.commentLink}}
_邮箱_: `{{self.mail}}`
_审核_: {{self.status}}

仅供评论预览,点击 [查看完整內容]({{site.postUrl}})