[wp-trac] [WordPress Trac] #41750: Update PHPMailer to 6.0
WordPress Trac
noreply at wordpress.org
Wed Apr 29 08:32:26 UTC 2020
#41750: Update PHPMailer to 6.0
-------------------------------------------------+-------------------------
Reporter: Synchro | Owner:
| SergeyBiryukov
Type: enhancement | Status: accepted
Priority: normal | Milestone: Future
| Release
Component: External Libraries | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-dev- | Focuses:
note early |
-------------------------------------------------+-------------------------
Comment (by ayeshrajans):
Please see an updated patch with a few more improvements
([https://github.com/Ayesh/wordpress-
develop/compare/447bbd194c...9c01d307a2e66b10 patch list] compared to
41750-7-obsolete.patch):
1. Simplify `$phpmailer->addCustomHeader` to use single quotes to the
double quotes don't need to be escaped:
`$phpmailer->addCustomHeader( sprintf( 'Content-Type: %s; boundary="%s"',
$content_type, $boundary ) );`
as opposed to:
`$phpmailer->addCustomHeader( sprintf( "Content-Type: %s;
boundary=\"%s\"", $content_type, $boundary ) );`
2. Add exception handling for other `$phpmailer->addCustomHeader` calls.
This brings back the old behavior of silently handling invalid values.
`$phpmailer->addAttachment` already has similar exception handling.
3. Use `::class` constant in the deprecated `class-phpmailer.php` file.
PHP 5.5 supports this, and can make the class names clickable in IDEs and
helps static analyzers as well.
**Tests**: [https://travis-ci.com/github/Ayesh/wordpress-
develop/builds/162647249 passing]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41750#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list