Commit 1c279ec
committed
[Mailer] Add RemoteTemplateEmail to send emails rendered from provider-hosted templates
Add a first-class abstraction for emails rendered by the mail provider
from a template hosted on its side:
* `RemoteTemplateEmail` carries a template reference and its variables,
and allows sending without a local text/HTML body;
* transports opt in by implementing `RemoteTemplateTransportInterface`
and mapping the template to their native API payload; other transports
fail with an explicit exception instead of silently dropping the
template;
* implement the interface in the Brevo, Resend and Sendgrid bridges;
* deprecate the "templateid" and "params" magic headers of the Brevo
bridge in favor of the new abstraction.1 parent ff431bb commit 1c279ecCopy full SHA for 1c279ec
24 files changed
+548-21Lines changed: 548 additions & 21 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- src/Symfony/Component
- Mailer
- Bridge
- Brevo
- Tests/Transport
- Transport
- Resend
- Tests/Transport
- Transport
- Sendgrid
- Tests/Transport
- Transport
- Tests
- Transport
- Transport
- Mime
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+5Lines changed: 5 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
21 | 26 | |
22 | 27 | |
23 | 28 | |
|
Collapse file
src/Symfony/Component/Mailer/Bridge/Brevo/CHANGELOG.md
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Brevo/CHANGELOG.md+6Lines changed: 6 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
4 | 10 | |
5 | 11 | |
6 | 12 | |
|
Collapse file
src/Symfony/Component/Mailer/Bridge/Brevo/Tests/Transport/BrevoApiTransportTest.php
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Brevo/Tests/Transport/BrevoApiTransportTest.php+44-8Lines changed: 44 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
| 15 | + |
| 16 | + |
15 | 17 | |
| 18 | + |
16 | 19 | |
17 | 20 | |
18 | 21 | |
| ||
21 | 24 | |
22 | 25 | |
23 | 26 | |
| 27 | + |
24 | 28 | |
25 | 29 | |
26 | 30 | |
27 | 31 | |
28 | 32 | |
29 | 33 | |
30 | 34 | |
| 35 | + |
| 36 | + |
31 | 37 | |
32 | 38 | |
33 | 39 | |
| ||
54 | 60 | |
55 | 61 | |
56 | 62 | |
57 | | - |
58 | 63 | |
59 | 64 | |
60 | 65 | |
61 | 66 | |
62 | 67 | |
63 | 68 | |
64 | | - |
65 | | - |
66 | 69 | |
67 | 70 | |
68 | 71 | |
| ||
75 | 78 | |
76 | 79 | |
77 | 80 | |
78 | | - |
79 | | - |
80 | | - |
81 | | - |
82 | | - |
83 | 81 | |
84 | 82 | |
85 | 83 | |
86 | 84 | |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
87 | 123 | |
88 | 124 | |
89 | 125 | |
|
Collapse file
src/Symfony/Component/Mailer/Bridge/Brevo/Transport/BrevoApiTransport.php
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Brevo/Transport/BrevoApiTransport.php+16-2Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
17 | 17 | |
18 | 18 | |
19 | 19 | |
| 20 | + |
20 | 21 | |
21 | 22 | |
| 23 | + |
22 | 24 | |
23 | 25 | |
24 | 26 | |
| ||
30 | 32 | |
31 | 33 | |
32 | 34 | |
33 | | - |
| 35 | + |
34 | 36 | |
35 | 37 | |
36 | 38 | |
| ||
88 | 90 | |
89 | 91 | |
90 | 92 | |
| 93 | + |
| 94 | + |
91 | 95 | |
92 | 96 | |
93 | 97 | |
94 | | - |
95 | 98 | |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
96 | 108 | |
97 | 109 | |
98 | 110 | |
| ||
154 | 166 | |
155 | 167 | |
156 | 168 | |
| 169 | + |
157 | 170 | |
158 | 171 | |
159 | 172 | |
160 | 173 | |
161 | 174 | |
| 175 | + |
162 | 176 | |
163 | 177 | |
164 | 178 | |
|
Collapse file
src/Symfony/Component/Mailer/Bridge/Brevo/composer.json
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Brevo/composer.json+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
17 | 17 | |
18 | 18 | |
19 | 19 | |
20 | | - |
| 20 | + |
| 21 | + |
21 | 22 | |
22 | 23 | |
23 | 24 | |
|
Collapse file
src/Symfony/Component/Mailer/Bridge/Resend/CHANGELOG.md
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Resend/CHANGELOG.md+5Lines changed: 5 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
4 | 9 | |
5 | 10 | |
6 | 11 | |
|
Collapse file
src/Symfony/Component/Mailer/Bridge/Resend/Tests/Transport/ResendApiTransportTest.php
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Resend/Tests/Transport/ResendApiTransportTest.php+32Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
| 23 | + |
23 | 24 | |
24 | 25 | |
25 | 26 | |
| ||
81 | 82 | |
82 | 83 | |
83 | 84 | |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
84 | 116 | |
85 | 117 | |
86 | 118 | |
|
Collapse file
src/Symfony/Component/Mailer/Bridge/Resend/Transport/ResendApiTransport.php
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Resend/Transport/ResendApiTransport.php+14-2Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
17 | 17 | |
18 | 18 | |
19 | 19 | |
| 20 | + |
20 | 21 | |
21 | 22 | |
| 23 | + |
22 | 24 | |
23 | 25 | |
24 | 26 | |
| ||
30 | 32 | |
31 | 33 | |
32 | 34 | |
33 | | - |
| 35 | + |
34 | 36 | |
35 | 37 | |
36 | 38 | |
| ||
94 | 96 | |
95 | 97 | |
96 | 98 | |
| 99 | + |
| 100 | + |
97 | 101 | |
98 | 102 | |
99 | 103 | |
100 | | - |
101 | 104 | |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
102 | 114 | |
103 | 115 | |
104 | 116 | |
|
Collapse file
src/Symfony/Component/Mailer/Bridge/Resend/composer.json
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Resend/composer.json+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
17 | 17 | |
18 | 18 | |
19 | 19 | |
20 | | - |
| 20 | + |
21 | 21 | |
22 | 22 | |
23 | 23 | |
|
Collapse file
src/Symfony/Component/Mailer/Bridge/Sendgrid/CHANGELOG.md
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Sendgrid/CHANGELOG.md+5Lines changed: 5 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
4 | 9 | |
5 | 10 | |
6 | 11 | |
|
0 commit comments