-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] Pass the port from the Mailgun DSN to the MailgunSmtpTransport #49768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mailer] Pass the port from the Mailgun DSN to the MailgunSmtpTransport #49768
Conversation
So the default should be 465 oder 587 as stated by the mailgun docs? |
As far as I know, 587 is the default they're recommending now. From previous discussion on this topic, I gathered that there is intention to change this default in Symfony though, since 465 still works. |
I wonder if we should use 567 as default then 🧐 |
The idea of these specific DSN is to make the configuration automatic. So, if 587 is the preferred port and if there is no downsides in using it, let's just change the default. |
And until now noone is blocked by upstream, at least we got no bug report. |
In that case, this can be closed in favor of #49805. I've sent a docs PR to clarify the port-ignoring part of the automatic DSNs. |
Closing in favor of #49805 |
This PR was squashed before being merged into the 6.3 branch. Discussion ---------- [Mailer] Update default Mailgun port | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | License | MIT Alternative to #49768. Instead of passing the port from the DSN, update the default to 587, which is recommended by Mailgun. I've also opened a docs PR to clarify that specific bridge DSNs ignore the port: symfony/symfony-docs#18118 Commits ------- 05e9be7 [Mailer] Update default Mailgun port
…iler transport DSN See symfony/symfony#49768
…ailer transport DSN (dreadnip) This PR was submitted for the 6.3 branch but it was merged into the 5.4 branch instead. Discussion ---------- Add note about custom port being ignored by specific mailer transport DSN See symfony/symfony#49768 Seems like there has been some confusion about this: * symfony/symfony#46979 * symfony/symfony#44794 People start with the default they're given by the docs, e.g. `sendgrid+smtp` and then try to append `:<port>` to configure it, which doesn't work. As far as I know, the official recommendation is to use the regular `smtp` transport instead when using custom config: symfony/symfony#36224 (comment) Commits ------- b39027f Add note about custom port configuration being ignored by specific mailer transport DSN
This PR removes the hardcoded port on the Mailgun SMTP transport and replaces it by the value set in the DSN. The original (465) is still the fallback in case
null
is passed.In the Mailer docs, the following DSN is given as a starting point to use the Mailgun bridge
Developers might want to tweak this DSN, for example to set the region and/or port:
But the port is currently ignored after parsing the DSN.
The current work-around is to not use the
mailgun+smtp
transport and stick to the defaultsmtp://
one:This is confusing and having the
mailgun+smtp
DSN parse the port correctly is the behavior I would expect from reading the docs.References: