Commit 703596e
committed
feature #46326 SMTP Transport to provide the (final) Message-ID if available (Raphaël Droz)
This PR was squashed before being merged into the 6.2 branch.
Discussion
----------
SMTP Transport to provide the (final) Message-ID if available
bug #46323 [Mailer] SMTP transport does not provide the (final) Message-ID
| Q | A
| ------------- | ---
| Branch? | 6.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #46323
| License | MIT
| Doc PR | symfony/symfony-docs#
Questions / Answers:
- **Q**: Why storing 250 inside **`$mtaResult`** instead of using the already available `$message->getDebug()`?
- A: Because the later may be huge (especially in case of attachment) and running a regexp over it would be less than safe. Instead `$mtaResult` only contains one line
- **Q**: Why a new **`public`** method?
- A: Because child SMTP Transport may make other assumptions about the return `250 Ok` value and provide a custom logic / regexp.
- **Q**: Why **regexp**?
- A: Because there is no official standard for this line (other than the `250 Ok` prefix)
Additionally (see https://symfony.com/releases):
- [ ] Always add tests and ensure they pass. _I can't. Don't have the time. Left to maintainers / other contributors_
- [x] Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too.)
- [x] Features and deprecations must be submitted against the latest branch.
- [x] Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
- [x] Never break backward compatibility (see https://symfony.com/bc).
Commits
-------
441c9b0 SMTP Transport to provide the (final) Message-ID if availableFile tree
1 file changed
+29
-1
lines changed- src/Symfony/Component/Mailer/Transport/Smtp
1 file changed
+29
-1
lines changedLines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
152 | 158 | | |
153 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
154 | 182 | | |
155 | 183 | | |
156 | 184 | | |
| |||
213 | 241 | | |
214 | 242 | | |
215 | 243 | | |
216 | | - | |
| 244 | + | |
217 | 245 | | |
218 | 246 | | |
219 | 247 | | |
| |||
0 commit comments