Configure SMTP via separate environment variables
CI / Deploy / test (push) Successful in 1m2s
CI / Deploy / deploy (push) Skipped

Add SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD and SMTP_TLS instead of
requiring a transport URL, so passwords need no URL escaping. Port 465 uses
implicit SSL. EMAIL_TRANSPORT_DEFAULT_URL keeps working as a fallback.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-12 00:10:29 +01:00
1 parent 31df730374
commit df4445c1a4
5 files changed
+36 -20

No files matched your search

+3 -4
View File
@@ -57,12 +57,11 @@ return [
'EmailTransport' => [
/*
* Local default: mails are written as .eml files to tmp/mails/.
* For production use SMTP, e.g.
* EMAIL_TRANSPORT_DEFAULT_URL=smtp://user:pass@mail.example.org:587?tls=true
* For real delivery set SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD and SMTP_TLS
* (see config/.env.example); then this override is skipped.
*/
'default' => [
'default' => env('SMTP_HOST') || env('EMAIL_TRANSPORT_DEFAULT_URL') ? [] : [
'className' => \App\Mailer\Transport\FileTransport::class,
'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
],
],
];