Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Mailer] Configuration of local domain not possible? #37300

Copy link
Copy link
Closed
@fritzmg

Description

@fritzmg
Issue body actions

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.