feat: add config for mail server name (#13632)

fix #13627

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added configurable display names for primary and fallback SMTP
servers, improving email sender identification.
* Defaults to “AFFiNE Server,” with support for MAILER_SERVERNAME
environment variable for the primary SMTP.
* Exposed in admin settings for easy setup alongside existing SMTP
options.
* Names are now passed through to mail transport options for consistent
use across emails.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2025-09-22 19:52:15 +08:00
committed by GitHub
parent 7fe95f50f4
commit e3f3c8c4a8
4 changed files with 31 additions and 0 deletions

View File

@@ -89,6 +89,11 @@
}
},
"mailer": {
"SMTP.name": {
"type": "String",
"desc": "Name of the email server (e.g. your domain name)",
"env": "MAILER_SERVERNAME"
},
"SMTP.host": {
"type": "String",
"desc": "Host of the email server (e.g. smtp.gmail.com)",
@@ -123,6 +128,10 @@
"type": "Array",
"desc": "The emails from these domains are always sent using the fallback SMTP server."
},
"fallbackSMTP.name": {
"type": "String",
"desc": "Name of the fallback email server (e.g. your domain name)"
},
"fallbackSMTP.host": {
"type": "String",
"desc": "Host of the email server (e.g. smtp.gmail.com)"