twikoo邮箱通知模板分享

先上效果

MAIL_TEMPLATE预览效果
MAIL_TEMPLATE_ADMIN模板预览效果

MAIL_TEMPLATE模板

代码已经分享到了CodePen

将代码压缩(例如minify),然后进到twikoo后台-配置管理-邮件通知

在MAIL_TEMPLATE一项填入压缩后的代码

代码如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<div class="page flex-col" style="background-image: linear-gradient(to bottom, #7877F9, #3E3DA8);">
<div class="box_3 flex-col" style="
display: flex;
position: relative;
width: 100%;
height: 206px;
background: #3E3DA8;
background-size: auto 100%;
background-image: linear-gradient(to bottom, rgba(62,61,168,0) 0%,rgba(62,61,168, 0.1) 80%,rgba(62,61,168,1) 100%),url(&quot;https://imgmo.com/images/2023/09/26/4e2e15ef06227b24194674bbb6dea458.png&quot;);
background-position: center;
top: 0;
left: 0;
justify-content: center;
border-radius: 15px 15px 15px 15px;
"><div class="section_1 flex-col" style="
background-image: url(&quot;https://imgmo.com/images/2023/09/26/60245c22765755533c72a892803de49a.png&quot;);
position: absolute;
width: 152px;
height: 152px;
display: flex;
top: 130px;
background-size: cover;
"></div></div>
<div class="box_4 flex-col" style="
margin-top: 92px;
display: flex;
flex-direction: column;
align-items: center;
">
<div class="text-group_5 flex-col justify-between" style="
display: flex;
flex-direction: column;
align-items: center;
margin: 0 20px;
">
<span class="text_1" style="
font-size: 26px;
font-family: PingFang-SC-Bold, PingFang-SC;
font-weight: bold;
color: #F3E6FF;
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: #FEB3B1;
line-height: 22px;
margin-top: 21px;
text-align: center;
">你之前的评论&nbsp;&nbsp;${SITE_NAME} 博客中收到来自&nbsp;${NICK}&nbsp;的回复</span>
</div>
<div class="box_2 flex-row" style="
margin: 0 20px;
min-height: 128px;
background: #F3E6FF;
border-radius: 12px;
margin-top: 34px;
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 3px 16px 32px 16px;
width: 85%;
">
<div class="text-wrapper_4 flex-col justify-between" style="
display: flex;
flex-direction: column;
width: 90%;
margin: auto;
margin-bottom: 16px;
">
<div style="
padding:15px 12px 0 12px;
margin-top:0px
">
<div class=Messages_box>
<p style="
font-size: 20px;
display:flex;
justify-content:center;
color:#3E3DA8
"><strong style="
font-size: 45px;
color:#F3E6FF;
max-width:506px;
background-color:#7877F9;
padding:3px 10% 4px 10%;
border-radius:9px
">留言板</strong></p>
<hr style="
display: flex;
position: relative;
border: 9px double #3E3DA8;
box-sizing: content-box;
height: 0px;
overflow: visible;
width: 100%;
">
<p style="
font-size: 20px;
display:flex;
justify-content:center;
color:#3E3DA8
"><strong style="
font-size: 10px;
color:#F3E6FF;
max-width:506px;
background-color:#7877F980;
padding:3px 60px 4px 60px;
border-radius:9px
">原文记录</strong></p>
<div class="ax_post_box-comments-single Messages-author"
style="
display:flex;
justify-content:flex-end;
margin-bottom:5px;
margin-top:7px;
color:#FEB3B1
">
<div class=ax_post_box-comment-avatar style="
width:auto;
flex:none;
order:2
"><img src=${PARENT_IMG}
style="
width:40px;
height:40px;
border-radius:5px
"></div>
<div class=ax_post_box-comment-text style="
position:relative;
margin-right:10px
"><span
class=ax_post_box-comment-text-before
style="
width:0;
height:0;
border-top:8px solid transparent;
border-bottom:8px solid transparent;
border-left:8px solid;
border-left-color:#3E3DA8;
border-right:0;
border-right-color:transparent;
right:-7px;
left:auto;
top:12px;
position:absolute
"></span>
<div class=ax_post_box-comment-text-inner
style="
max-width:506px;
background-color:#3E3DA8;
padding:10px;
border-radius:9px;
margin-bottom:3px
">${PARENT_COMMENT}</div></div></div>
<hr style="
display: flex;
position: relative;
border: 1px dashed #3E3DA8;
box-sizing: content-box;
height: 0px;
overflow: visible;
width: 100%;
margin-top:30px
">
<p style="
font-size: 20px;
display:flex;
justify-content:center;
color:#3E3DA8
"><strong style="
font-size: 10px;
color:#F3E6FF;
max-width:506px;
background-color:#7877F980;
padding:3px 60px 4px 60px;
border-radius:9px
">当前位置</strong></p>
<p><strong style="
font-size: 20px;
color:#3E3DA8"
>${NICK}</strong><strong style="
color:#E25860;
"> 回复:</strong></p>
<div class="ax_post_box-comments-single Messages-user" style="
display:flex;
margin-bottom:5px;
margin-top:7px;
color:#FEB3B1
">
<div class=ax_post_box-comment-avatar style="
width:auto;
flex:none
"><img src=${IMG}
style="
width:40px;
height:40px;
border-radius:5px
"></div>
<div class=ax_post_box-comment-text style="
position:relative;
margin-left:10px
"><span
class=ax_post_box-comment-text-before
style="
width:0;
height:0;
border-top:8px solid transparent;
border-bottom:8px solid transparent;
border-right:8px solid;
border-right-color:#3E3DA8;
left:-7px;
right:auto;
top:12px;
position:absolute
"></span>
<div class=ax_post_box-comment-text-inner style="
max-width:506px;
background-color:#3E3DA8;
padding:10px;
border-radius:9px;
margin-bottom:3px
">${COMMENT}</div></div></div></div></div></div>

<a class="text-wrapper_2 flex-col" style="
min-width: 106px;
height: 38px;
background: #7877F9;
border-radius: 32px;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
margin: auto;
margin-top: 32px;
" href="${POST_URL}">
<span class="text_5" style="
color: #F3E6FF;
">查看详情</span>
</a>
</div>
<div class="text-group_6 flex-col justify-between" style="
display: flex;
flex-direction: column;
align-items: center;
margin-top: 34px;
">
<span class="text_6" style="
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #f3e6ff8e;
line-height: 17px;
">此邮件由评论服务自动发出,直接回复无效。</span>
<a class="text_7" style="
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FEB3B1;
line-height: 17px;
margin-top: 6px;
text-decoration: none;
" href="${SITE_URL}">前往博客</a>
<a class="text_8" style="
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #f3e6ff8e;
line-height: 17px;
margin-top: 6px;
text-decoration: none;
"></a>
</div>
</div>
</div>

MAIL_TEMPLATE_ADMIN模板

如果还需要MAIL_TEMPLATE_ADMIN的模板代码
也分享到CodePen

代码如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<div class="page flex-col" style="background-image: linear-gradient(to bottom, #7877F9, #3E3DA8);">
<div class="box_3 flex-col" style="
display: flex;
position: relative;
width: 100%;
height: 206px;
background: #3E3DA8;
background-size: auto 100%;
background-image: linear-gradient(to bottom, rgba(62,61,168,0) 0%,rgba(62,61,168, 0.1) 80%,rgba(62,61,168,1) 100%),url(&quot;https://imgmo.com/images/2023/09/26/4e2e15ef06227b24194674bbb6dea458.png&quot;);
background-position: center;
top: 0;
left: 0;
justify-content: center;
border-radius: 15px 15px 15px 15px;
"><div class="section_1 flex-col" style="
background-image: url(&quot;https://imgmo.com/images/2023/09/26/60245c22765755533c72a892803de49a.png&quot;);
position: absolute;
width: 152px;
height: 152px;
display: flex;
top: 130px;
background-size: cover;
"></div></div>
<div class="box_4 flex-col" style="
margin-top: 92px;
display: flex;
flex-direction: column;
align-items: center;
">
<div class="text-group_5 flex-col justify-between" style="
display: flex;
flex-direction: column;
align-items: center;
margin: 0 20px;
">
<span class="text_1" style="
font-size: 26px;
font-family: PingFang-SC-Bold, PingFang-SC;
font-weight: bold;
color: #F3E6FF;
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: #FEB3B1;
line-height: 22px;
margin-top: 21px;
text-align: center;
">你之前的评论&nbsp;&nbsp;${SITE_NAME} 博客中收到来自&nbsp;${NICK}&nbsp;(${MAIL})&nbsp;的回复</span>
</div>
<div class="box_2 flex-row" style="
margin: 0 20px;
min-height: 128px;
background: #F3E6FF;
border-radius: 12px;
margin-top: 34px;
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 3px 16px 32px 16px;
width: 85%;
">

<div class="text-wrapper_4 flex-col justify-between" style="
display: flex;
flex-direction: column;
width: 90%;
margin: auto;
margin-bottom: 16px;
">
<div style="
padding:15px 12px 0 12px;
margin-top:0px
">
<div class=Messages_box>
<p style="
font-size: 20px;
display:flex;
justify-content:center;
color:#3E3DA8
"><strong style="
font-size: 45px;
color:#F3E6FF;
max-width:506px;
background-color:#7877F9;
padding:3px 10% 4px 10%;
border-radius:9px
">📫博主收件箱</strong></p>
<hr style="
display: flex;
position: relative;
border: 2px dashed #3E3DA8;
box-sizing: content-box;
height: 0px;
overflow: visible;
width: 100%;
">
<p style="
font-size: 20px;
display:flex;
justify-content:center;
color:#3E3DA8
"><strong style="
font-size: 10px;
color:#F3E6FF;
max-width:506px;
background-color:#7877F980;
padding:3px 60px 4px 60px;
border-radius:9px
">新消息</strong></p>
<p><strong style="
font-size: 20px;
color:#3E3DA8"
>${NICK}</strong><strong style="
color:#E25860;
"></strong></p>
<div class="ax_post_box-comments-single Messages-user" style="
display:flex;
margin-bottom:5px;
margin-top:7px;
color:#FEB3B1
">
<div class=ax_post_box-comment-avatar style="
width:auto;
flex:none
"><img src=${IMG}
style="
width:40px;
height:40px;
border-radius:5px
"></div>
<div class=ax_post_box-comment-text style="
position:relative;
margin-left:10px
"><span
class=ax_post_box-comment-text-before
style="
width:0;
height:0;
border-top:8px solid transparent;
border-bottom:8px solid transparent;
border-right:8px solid;
border-right-color:#3E3DA8;
left:-7px;
right:auto;
top:12px;
position:absolute
"></span>
<div class=ax_post_box-comment-text-inner style="
max-width:506px;
background-color:#3E3DA8;
padding:10px;
border-radius:9px;
margin-bottom:3px
">${COMMENT}</div></div></div></div></div></div>

<a class="text-wrapper_2 flex-col" style="
min-width: 106px;
height: 38px;
background: #7877F9;
border-radius: 32px;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
margin: auto;
margin-top: 32px;
" href="${POST_URL}">
<span class="text_5" style="
color: #F3E6FF;
">查看详情</span>
</a>
</div>
<div class="text-group_6 flex-col justify-between" style="
display: flex;
flex-direction: column;
align-items: center;
margin-top: 34px;
">
<span class="text_6" style="
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #f3e6ff8e;
line-height: 17px;
">此邮件由评论服务自动发出,直接回复无效。</span>
<a class="text_7" style="
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FEB3B1;
line-height: 17px;
margin-top: 6px;
text-decoration: none;
" href="${SITE_URL}">前往博客</a>
<a class="text_8" style="
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #f3e6ff8e;
line-height: 17px;
margin-top: 6px;
text-decoration: none;
"></a>
</div>
</div>
</div>