跳到主要内容
版本:Current

邮件配置

默认 EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend,对接 Resend SMTP。

变量推荐
EMAIL_HOSTsmtp.resend.com
EMAIL_PORT587
EMAIL_HOST_USERresend
EMAIL_HOST_PASSWORD 或 RESEND_API_KEYAPI Key
EMAIL_USE_TLStrue(587)
EMAIL_USE_SSLfalse(587);465 则相反
DEFAULT_FROM_EMAILBUCSSA Portal <noreply@mail.bucssa.org>
SITE_URL邮件内绝对链接根
MAILING_ENABLEDfalse 时只打日志不发信
SUPPORT_EMAIL页脚/客服

本地:

EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
MAILING_ENABLED=true

CI 使用 locmem backend。

退订:/accounts/unsubscribe/?email=...&token=...,签名在 mailing/unsubscribe.py。用户也可在 /accounts/settings/ 按分类关闭。