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
Copy file name to clipboardExpand all lines: site/src/docs/configuration/email/index.md
+76Lines changed: 76 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -218,3 +218,79 @@ The easiest way to test it is to mount `error_response.html.tmpl`, and then head
218
218

219
219
220
220
If the file is mounted correctly, the page will render the new file content immediately after hitting the refresh button in your browser once you change the file.
221
+
222
+
### Template variables
223
+
224
+
Each template has access to different variables. All templates use Go's [text/template](https://pkg.go.dev/text/template) syntax.
The default templates produce HTML emails. To send plain-text emails instead, set `AUTH_EMAIL_CONTENT_TYPE=text/plain` (for login confirmation) or `NOTIFY_EMAIL_CONTENT_TYPE=text/plain` (for notifications), and provide custom templates that output plain text instead of HTML.
274
+
275
+
Note that `{{.CommentText}}` and `{{.ParentCommentText}}` contain HTML markup. There is no built-in HTML-to-text conversion, so for comments with rich formatting the output will include raw HTML tags.
276
+
277
+
Example plain-text notification template (`email_reply.html.tmpl`):
278
+
279
+
```
280
+
New reply from {{.UserName}}{{if .PostTitle}} on "{{.PostTitle}}"{{end}}
0 commit comments