Skip to content

Conversation

@Jeroeny
Copy link
Contributor

@Jeroeny Jeroeny commented Dec 15, 2025

Q A
Branch? 8.1
Bug fix? no
New feature? no
Deprecations? no
License MIT

PHP has a sendmail_path ini value that it uses by default: https://www.php.net/manual/en/mail.configuration.php.
When switching to Symfony, this value is no longer used. Instead a hardcoded default is used. Which is also a different one than the ini's default: /usr/sbin/sendmail -t -i.

Is it possible to use the same logic in Symfony's sendmail transport?

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the constructor:

The recommended mode is "-bs" since it is interactive and failure notifications are hence possible.
Note that the -t mode does not support error reporting and does not support Bcc properly (the Bcc headers are not removed).

The change that's proposed is a regression in this regard.

I understand the desire to be able to have control over the setting using php.ini, but I'd rather find a way to be sure that the value that comes through ini_get is really a choice, and not just a not-ideal default.
Is that possible?

Since we're talking about control: did you check how configuring the $command argument is possible using semantic config in frameworkbundle? I don't remember. If that's possible, that's the way, isn't it?

@Jeroeny
Copy link
Contributor Author

Jeroeny commented Dec 16, 2025

Ah the default seems fair then indeed. I will need to check the framework config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants