mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: separate SMTP envelope and header addresses (#21840)
## Description When configuring a From address with a display name (e.g., `Coder System <system@coder.com>`), the SMTP `MAIL FROM` command was incorrectly receiving the full address string instead of just the bare email address, causing `501 Invalid MAIL argument` errors on some SMTP servers. ## Changes - Updated `validateFromAddr` to return both: - `envelopeFrom`: bare email for SMTP `MAIL FROM` command (RFC 5321) - `headerFrom`: original address with display name for email header (RFC 5322) Fixes #20727
This commit is contained in:
@@ -109,11 +109,11 @@ existing one.
|
||||
|
||||
**Server Settings:**
|
||||
|
||||
| Required | CLI | Env | Type | Description | Default |
|
||||
|:--------:|---------------------|-------------------------|----------|-----------------------------------------------------------|-----------|
|
||||
| ✔️ | `--email-from` | `CODER_EMAIL_FROM` | `string` | The sender's address to use. | |
|
||||
| ✔️ | `--email-smarthost` | `CODER_EMAIL_SMARTHOST` | `string` | The SMTP relay to send messages (format: `hostname:port`) | |
|
||||
| ✔️ | `--email-hello` | `CODER_EMAIL_HELLO` | `string` | The hostname identifying the SMTP server. | localhost |
|
||||
| Required | CLI | Env | Type | Description | Default |
|
||||
|:--------:|---------------------|-------------------------|----------|-------------------------------------------------------------------|-----------|
|
||||
| ✔️ | `--email-from` | `CODER_EMAIL_FROM` | `string` | The sender's address to use (e.g. `"Coder <coder@example.com>"`). | |
|
||||
| ✔️ | `--email-smarthost` | `CODER_EMAIL_SMARTHOST` | `string` | The SMTP relay to send messages (format: `hostname:port`) | |
|
||||
| ✔️ | `--email-hello` | `CODER_EMAIL_HELLO` | `string` | The hostname identifying the SMTP server. | localhost |
|
||||
|
||||
**Authentication Settings:**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user