Typecho评论邮件通知插件--适配Typecho1.2
插件简介
Typecho博客评论通过时发送邮件提醒的一款插件,可以让访客第一时间收到回复。
插件使用
- 下载本插件,解压放到/usr/plugins/目录中
- 文件夹名改为Comment2Mail
- 登录管理后台,激活插件
- 配置插件 填写SMTP参数
- 填写配置
需要注意的是,如果使用QQ邮箱,密码栏应填写授权码,而非QQ密码,具体看下面:
QQ邮件SMTP配置说明
新浪配置
阿里云邮件配置
网易163邮件配置
下载地址
{cloud title="插件下载" type="lz" url="https://www.jichun29.cn/usr/uploads/2020/02/3549201462.zip" password=""/}
项目地址
https://github.com/ShadowySpirits/Comment2Mail
模板修改
默认模板比较简陋,分享一个 reply.html
模板,效果如下,请自行 DIY。
<meta charset="utf-8">
<div style="position:relative;width:450px;height:auto;margin:0 auto;padding-bottom:5px;border:rgb(224, 221, 224) solid 1px;border-radius:10px">
<div style="background-image:url(https://img.jichun29.cn/img/202303232155566.jpg);width:100%;height:300px;background-size:cover;background-repeat:no-repeat;border-radius:10px 10px 0px 0px"></div>
<div style="width:40%;height:40px;background-color:rgb(231, 145, 145);margin-top:-20px;margin-left:20px;color:#fff;text-align:center;line-height:40px;border-radius:30px">
亲爱的:{author} !
</div>
<div style="line-height:180%;padding:0 15px 12px;width:90%;margin:auto;margin-bottom:0px;font-size:12px">
<div style="border-bottom:1px solid rgb(216, 213, 213);font-size:13px;margin:10px 0px;padding:10px 0px">
<span style="color:#12ADDB;font-weight:bold">> </span>
<span>您在</span>
<a style="text-decoration:none;color:#12ADDB;font-weight:bold;" href="{permalink}" target="_blank">《{title}》</a>
<span>的评论有了新回复呢!</span>
</div>
<div style="padding:0 10px 0 10px;margin-top:18px">
<p>您的评论:</p>
<p style="padding:10px 15px;margin:18px 0;border-radius:30px;background-color:rgb(255, 240, 240);">{text}</p>
<p><strong>{replyAuthor}</strong> 给您的回复:</p>
<p style="padding:10px 15px;margin:18px 0;border-radius:30px;background-color:rgb(240, 240, 255);">{replyText}</p>
</div>
</div>
<div
style="color:#8c8c8c;font-size:8px;width:93%;margin:auto;margin-top:-30px">
<p style="padding:20px;">萤火虫消失之后,那光的轨迹仍久久地印在我的脑际。那微弱浅淡的光点,仿佛迷失方向的魂灵,在漆黑厚重的夜幕中彷徨。——《挪威的森林》村上春树</p>
</div>
<a style="text-decoration:none;background-color:rgb(155, 151, 221);color:#FFF;width:40%;text-align:center;height:40px;line-height:40px;box-shadow:5px 5px 5px rgba(0,0,0,0.2);margin:-10px auto;display:block;border-radius:30px" href="{commentUrl}" target="_blank">查看完整回复內容</a>
<div style="color:#8c8c8c;font-size:8px;width:100%;text-align:center;margin-top:30px">
<p>本邮件为系统自动发送,请勿直接回复哦!</p>
</div>
<div style="color:#8c8c8c;font-size:8px;width:100%;text-align:center">
<p>Copyright © {blogName}. All Rights Reserved.</p>
</div>
</div>
分类:
Typecho
标签:
TypechoTypecho 插件
版权申明
本文系作者 @季春二九 原创发布在季春二九 - Keith 的Blog站点。未经许可,禁止转载。
暂无评论数据