fix(邮件发送): 适配 MailerSend SMTP 并迁移基础设施至 1Panel
Motivation: 将通知服务部署到 1Panel 生产环境,集成 MailerSend 邮件服务,修复 SMTP 协议中 MAIL FROM 命令因携带显示名而导致的发送失败问题。 Changes: * 修复 SMTP MAIL FROM 命令传入带显示名的完整地址导致发送失败的问题,新增 extractEmailAddr 提取裸地址 * 更新 SMTP 配置为 MailerSend 真实凭证,From 地址适配其域名验证要求 * 移除 docker-compose 中内置的 MySQL/Redis 服务,改为依赖外部 1Panel 基础设施 * 更新环境变量为生产环境实际凭据
This commit is contained in:
+5
-4
@@ -6,7 +6,7 @@ database:
|
||||
host: "mysql"
|
||||
port: 3306
|
||||
user: "root"
|
||||
password: "${DB_PASSWORD:-7Qay8mksnwrCffGi}"
|
||||
password: "${DB_PASSWORD:-notify}"
|
||||
database: "notification"
|
||||
|
||||
redis:
|
||||
@@ -16,11 +16,12 @@ redis:
|
||||
db: 0
|
||||
|
||||
smtp:
|
||||
host: "smtp.example.com"
|
||||
host: "smtp.mailersend.net"
|
||||
port: 587
|
||||
user: "notify@example.com"
|
||||
user: "MS_hqXDZ6@516886.xyz"
|
||||
password: "${SMTP_PASSWORD:-}"
|
||||
from: "Notification Service <notify@example.com>"
|
||||
# MailerSend 要求 from 域名已验证;未验证 516886.xyz 前先用试用域名
|
||||
from: "Notification Service <MS_hqXDZ6@516886.xyz>"
|
||||
|
||||
rate_limit:
|
||||
default: 100
|
||||
|
||||
Reference in New Issue
Block a user