Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@sanderdlm
Copy link

@sanderdlmsanderdlm commentedMar 22, 2023
edited
Loading

QA
Branch?6.3
Bug fix?no
New feature?yes
Deprecations?no
LicenseMIT

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 casenull is passed.

In theMailer docs, the following DSN is given as a starting point to use the Mailgun bridge

mailgun+smtp://USERNAME:PASSWORD@default

Developers might want to tweak this DSN, for example to set the region and/or port:

mailgun+smtp://USERNAME:PASSWORD@default:587?region=eu

But the port is currently ignored after parsing the DSN.

The current work-around is tonot use themailgun+smtp transport and stick to the defaultsmtp:// one:

smtp://USERNAME:PASSWORD@smtp.eu.mailgun.org:587

This is confusing and having themailgun+smtp DSN parse the port correctly is the behavior I would expect from reading the docs.

References:

All Mailgun customers should consider using port 587 as their default SMTP port unless you're explicitly blocked by your upstream network or hosting provider.
https://www.mailgun.com/blog/email/which-smtp-port-understanding-ports-25-465-587/

@OskarStark
Copy link
Contributor

OskarStark commentedMar 24, 2023
edited
Loading

So the default should be 465 oder 587 as stated by the mailgun docs?

@sanderdlm
Copy link
Author

As far as I know, 587 is the default they're recommending now. Fromprevious discussion on this topic, I gathered that there is intention to change this default in Symfony though, since 465 still works.

@OskarStark
Copy link
Contributor

I wonder if we should use 567 as default then 🧐

@fabpot
Copy link
Member

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.

@OskarStark
Copy link
Contributor

And until now noone is blocked by upstream, at least we got no bug report.

@sanderdlm
Copy link
Author

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.

@fabpot
Copy link
Member

Closing in favor of#49805

@fabpotfabpot closed thisMar 25, 2023
fabpot added a commit that referenced this pull requestMar 25, 2023
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       | MITAlternative 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#18118Commits-------05e9be7 [Mailer] Update default Mailgun port
fabpot pushed a commit to sanderdlm/symfony-docs that referenced this pull requestMar 25, 2023
fabpot added a commit to symfony/symfony-docs that referenced this pull requestMar 25, 2023
…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 DSNSeesymfony/symfony#49768Seems like there has been some confusion about this:*symfony/symfony#46979*symfony/symfony#44794People 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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

4 participants

@sanderdlm@OskarStark@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp