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

WordPress Trac noreply at wordpress.org
Sun Feb 9 01:12:26 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):

 The tests pass now!

  - It does not try to change anything with POP3. The `class-pop3.php` file
 does not appear to be related to the PHPMailer library we have (not 5.2,
 not 6.0, it might even be unrelated). So the `class-pop3.php` file remains
 unchanged.

  - Further, `wp-mail.php` file is not changed either. It will continue to
 use the `class-pop3.php` file which we don't change.

  - Composer is not incorporate, because I believe we should have discuss
 it further as to how to implement it properly. As of now, we copy the
 current PHPMailer 6.1 release verbatime on files `SMTP.php`,
 `PHPMailer.php`, and `Exception.php` to `src/wp-includes/PHPMailer`
 directory.

 The failing test from the last patch was not due to POP3 class. It does
 not look like "Post via email" feature even has tests.

 The failing test was because a `strpos` call on a sent email (mocked) does
 not contain proper headers. It did, but it was mime encoded which resulted
 in the `strpos` call from failing. This patch fixes that test too, but
 manually decoding the mime-encoded headers.

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


More information about the wp-trac mailing list