Description
Symfony\Component\Mailer\Transport\Smtp\SmtpTransport
has the ability to set the local domain for the HELO command (amongst other things, like the restart threshold). However, in the current implementation of the mailer service within symfony/framework-bundle
there does not seem to be a way to configure that. There does not even seem to be a way to retrieve the transport somehow, in order to be able to do it manually. @fapbot briefly mentioned here that it should be possible to configure these settings in the DSN (just as it was possible with Swiftmailer), but it looks like that was never implemented.
So EsmtpTransportFactory::create()
is missing the following:
if (null !== ($localDomain = $dsn->getOption('local_domain'))) {
$transport->setLocalDomain($localDomain);
}
if (null !== ($restartThreshold = $dsn->getOption('restart_threshold'))) {
$transport->setRestartThreshold((int) $restartThreshold);
}
if (null !== ($pingThreshold = $dsn->getOption('ping_threshold'))) {
$transport->setPingThreshold((int) $pingThreshold);
}
I can provide this as a PR of course, but I was wondering if this could may be considered a bug fix for Symfony 4.4?