1 Commits
Author SHA1 Message Date
c741f71c5c refactor(mail): replace PHPMailer with Symfony Mailer (#7190)
* refactor(mail): replace phpmailer with symfony mailer

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* style(codex): fix coding standards in Symfony Mailer migration

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(codex): fix TLS downgrade bug and From address overwrite in Symfony Mailer

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(codex): guard SMTP stream setTimeout calls behind SocketStream check

setTimeout() exists on SocketStream only; getStream() is typed AbstractStream, which fails PHPStan level 6.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(codex): correct inline graph CID, mandatory STARTTLS, and address validation in Symfony Mailer

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(codex): test inline CID, STARTTLS enforcement, and address-error handling

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(mail): qualify bare local addresses so sendmail recipients still work

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(mail): prune the stale PHPMailer vendor tree on upgrade

Replacing PHPMailer with Symfony Mailer dropped phpmailer from composer.json,
but the change also removed the prune_deprecated_files entries that cleaned up
the vendored tree, so an upgraded install would keep stale PHPMailer code on
disk. Add include/vendor/phpmailer (whole directory) to the prune list.

Co-Authored-By: Oz <oz-agent@warp.dev>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(mail): address transport review feedback

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(mail): drop setAutoTls() call missing from symfony/mailer 6.4

EsmtpTransport::setAutoTls() only exists in symfony/mailer >= 7.1, and the
6.4 series (needed for PHP 8.1) has no switch to disable opportunistic
STARTTLS, so hide the advertised capability in a small subclass instead.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(mail): vendor the psr/log 1.1.4 sources

include/vendor/psr/log was tracked with only its package metadata, so
composer treats it as installed and never extracts the classes. That was
harmless while nothing loaded them, but Symfony Mailer's AbstractTransport
instantiates Psr\Log\NullLogger on every transport, which now fatals at
runtime and in the test job.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(mail): match PHPMailer SMTP and attachment semantics

Empty secure modes use no-STARTTLS transport; inline disposition
is honoured; unreadable attachments fail closed.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: Thomas Vincent <thomas@vincent.dev>
Co-authored-by: Oz <oz-agent@warp.dev>
2026-07-15 08:30:24 -04:00