Commit 1187abf
committed
Mail: reset
The PHPMailer library may automatically switch its encoding based on various internal factors.
This commit fixes a bug where the `$phpmailer` global was unintentionally persisting its `Encoding` property from the first `wp_mail()` call to all subsequent calls.
This includes unit tests to verify the fix is accurate, and a change to the mock-mailer helper that worked around this bug just-in-time when running the test suite.
Props codebuddy, dilip2615, rishabhwp, sajjad67, sirlouen, stephenharris.
Fixes #33972.
git-svn-id: https://develop.svn.wordpress.org/trunk@61131 602fd350-edb4-49c9-b593-d223f7449a82Encoding to 8-bit in wp_mail().1 parent fd41ccd commit 1187abf
File tree
3 files changed
+27
-1
lines changed- src/wp-includes
- tests/phpunit
- includes
- tests/pluggable
3 files changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
387 | 396 | | |
388 | 397 | | |
389 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
654 | 672 | | |
0 commit comments