[wp-trac] [WordPress Trac] #41750: Update PHPMailer to 6.0

WordPress Trac noreply at wordpress.org
Fri Feb 7 23:50:37 UTC 2020


#41750: Update PHPMailer to 6.0
-------------------------------------------------+-------------------------
 Reporter:  Synchro                              |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.4
Component:  External Libraries                   |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-dev-   |     Focuses:
  note early                                     |
-------------------------------------------------+-------------------------

Comment (by ayeshrajans):

 Thanks for you reply @Synchro .

 > You only need to use PHPMailer\PHPMailer\Exception if you're explicitly
 using exceptions (they are turned off by default). You do still need to
 have the Exception class loaded as even with exceptions disabled it is
 used internally. So long as it's disabled, you shouldn't have any uncaught
 exceptions. Do you have examples where this is a problem?

 The way WordPress deals with the exceptions is by, well, ignoring them.
 For example, some tests fail where it tries to set an invalid email
 address, and the expected exception is not the same as PHPMailer 6 throws.
 As of now, all PHPMailer-specific exceptions are abstracted. Fatal errors
 are thrown with `WP_Error` which throws a `WPDieException`. As of now, the
 exceptions are closed within `wp_mail` function.

 > Frankly I feel a little unwell at the thought that some might still be
 using the POP3 library! Nobody should be using POP-before-SMTP for auth
 any more - the last time I used it was about 30 years ago. Indeed it
 doesn't have any test coverage - it was originally a third party library
 that was donated to the project, and it's a difficult thing to test as it
 requires coordination across protocols. Do you have any visibility on
 whether it's being used at all?

 Thank you - I honestly doubt if there is a meaningful real-life usage of
 this mail-fetch feature. I'd be overjoyed if this feature was moved to a
 contributed plugin and kept WP core clean.

 > Composer, at least in a build system, would seem essential, but WP
 obviously has a lot of BC issues to consider, and I know very little about
 the WP codebase.

 Every file in `wp-includes` is included on-demand with hardcoded file
 names, and WP does not necessarily follow PSR-4 or PSR-0 naming
 conventions either. Realistically, we have a long way to go to support
 composer fully throughout WordPress.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/41750#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list