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][Sendgrid] Add support forglobal region#61758

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

Merged

Conversation

@sonnymilton
Copy link
Contributor

QA
Branch?7.4
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#61706
LicenseMIT

This PR ensures that when theglobal region is provided toSendgridSmtpTransport,
the correct hostsmtp.sendgrid.net is used.

Previously, passingregion=global resulted in the host being built as
smtp.global.sendgrid.net, which does not exist.

Why

  • DSNs likesendgrid+smtp://KEY@default?region=global failed to connect.
  • SendGrid documentation specifies that the "global" region is justsmtp.sendgrid.net
    (same as when no region is provided).

How

  • UpdatedSendgridSmtpTransport to special-case theglobal region.
  • Added a unit test to cover this scenario.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

parent::__construct(null !==$region ?\sprintf('smtp.%s.sendgrid.net',$region) :'smtp.sendgrid.net',465,true,$dispatcher,$logger);
$host ='smtp.sendgrid.net';

if (null !==$region &&'global' !==strtolower($region)) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (null !==$region &&'global' !==strtolower($region)) {
if (null !==$region &&'global' !==$region) {

I don't think we need to make it case insensitive.

@fabpotfabpotforce-pushed the61706-sendgrid-global-region branch fromddb96be to9ce7d5dCompareSeptember 16, 2025 05:45
@fabpot
Copy link
Member

Thank you@sonnymilton.

@fabpotfabpot merged commit9b36ddc intosymfony:7.4Sep 16, 2025
11 of 12 checks passed
@ivan-wolf
Copy link

Hi@sonnymilton, thank you for providing a fix to#61706!

Did you also check theSendgridApiTransport? It might be affected by the same problem.

sonnymilton reacted with thumbs up emojisonnymilton reacted with eyes emoji

@sonnymiltonsonnymilton deleted the 61706-sendgrid-global-region branchSeptember 16, 2025 14:48
fabpot added a commit that referenced this pull requestSep 17, 2025
…ansport) (sonnymilton)This PR was merged into the 7.4 branch.Discussion----------[Mailer][Sendgrid] Add support for `global` region (api transport)| Q             | A| ------------- | ---| Branch?       | 7.4| Bug fix?      | no| New feature?  | yes| Deprecations? | no| Issues        |Fix#61706| License       | MITRelated to#61706 and#61758Add support for `global` region (`SendgridApiTransport`)Commits-------8eb5a45 [Mailer][Sendgrid] Add support for `global` region (api transport)
This was referencedOct 27, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

7.4

Development

Successfully merging this pull request may close these issues.

[Mailer] SendGrid'sglobal region is hot handled correctly inSendgridSmtpTransport

4 participants

@sonnymilton@carsonbot@fabpot@ivan-wolf

[8]ページ先頭

©2009-2025 Movatter.jp