Commit 9b36ddc
committed
feature symfony#61758 [Mailer][Sendgrid] Add support for
This PR was squashed before being merged into the 7.4 branch.
Discussion
----------
[Mailer][Sendgrid] Add support for `global` region
| Q | A
| ------------- | ---
| Branch? | 7.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Issues | Fix symfony#61706
| License | MIT
This PR ensures that when the `global` region is provided to `SendgridSmtpTransport`,
the correct host `smtp.sendgrid.net` is used.
Previously, passing `region=global` resulted in the host being built as
`smtp.global.sendgrid.net`, which does not exist.
### Why
- DSNs like `sendgrid+smtp://KEY@default?region=global` failed to connect.
- SendGrid documentation specifies that the "global" region is just `smtp.sendgrid.net`
(same as when no region is provided).
### How
- Updated `SendgridSmtpTransport` to special-case the `global` region.
- Added a unit test to cover this scenario.
Commits
-------
9ce7d5d [Mailer][Sendgrid] Add support for `global` regionglobal region (sonnymilton)File tree
3 files changed
+12
-1
lines changed- src/Symfony/Component/Mailer/Bridge/Sendgrid
- Tests/Transport
- Transport
3 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
0 commit comments