You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add subscription link support to notification email verification template (#573)
* add subscription link support to notification email verification template
* always show token for email subscription in verification email
* hide SubscribeURL from users
<p style="position: relative; max-width: 20em; margin: 0 auto 1em auto; line-height: 1.4em; color:#000!important;">Confirmation for <b>{{.User}}</b> on site <b>{{.Site}}</b></p>
183
+
{{if .SubscribeURL}}
184
+
<p style="position: relative; margin: 0 0 0.5em 0;color:#000!important;"><a href="{{.SubscribeURL}}{{.Token}}">Click here to subscribe to email notifications</a></p>
185
+
<p style="position: relative; margin: 0 0 0.5em 0;color:#000!important;">Alternatively, you can use code below for subscription.</p>
<p style="position: relative; font-size: 0.7em; opacity: 0.8;"><i style="color:#000!important;">Copy and paste this text into “token” field on comments page</i></p>
@@ -273,10 +279,11 @@ func (e *Email) buildVerificationMessage(user, email, token, site string) (strin
273
279
subject:=e.VerificationSubject
274
280
msg:= bytes.Buffer{}
275
281
err:=e.verifyTmpl.Execute(&msg, verifyTmplData{
276
-
User: user,
277
-
Token: token,
278
-
Email: email,
279
-
Site: site,
282
+
User: user,
283
+
Token: token,
284
+
Email: email,
285
+
Site: site,
286
+
SubscribeURL: e.SubscribeURL,
280
287
})
281
288
iferr!=nil {
282
289
return"", errors.Wrapf(err, "error executing template to build verification message")
0 commit comments