Skip to content

Email template not updating

如果你的邮件模板没有更新,请查看 认证日志 以了解发送邮件时是否有错误。当出现错误时,我们会使用具有有效语法的备用模板,所以不会显示你的任何自定义内容。

🌐 If your email templates are not updated, check Auth Logs for any errors when the email is sent. When there are errors, we will use a fallback template with valid syntax so it will not show any of your customizations.

典型错误通常与涉及变量的无效语法有关。有关支持的变量和语法,请参阅电子邮件模板文档

🌐 Typical errors relate to invalid syntax involving variables. Refer to the Email Templates docs for the supported variables and syntax.

示例错误信息

1
"event": "templatemailer_template_body_parse_error",
2
"msg": "templatemailer: template type \"recovery\": template: https://api.supabase.com/platform/auth/PROJECT_ID/templates/recovery:2: function \"default\" not defined",

这个错误显示了 default 出了问题,它在下面的无效语法中被使用了。

🌐 The error shows an issue with default which is used in the invalid syntax below.

1
{{ .Data.display_name | default: "test" }}

删除无效语法后的最终正确语法。

🌐 The final correct syntax after removing invalid syntax.

1
{{ .Data.display_name }}