Make WordPress Core

Opened 7 years ago

Last modified 7 years ago

#25560 closed enhancement

Update to PHPMailer 5.2.7 — at Version 4

Reported by: MattyRob Owned by:
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.7
Component: External Libraries Keywords: 3.9-early has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

As suggested in ticket #25014 I am opening a new ticket to where we can review the inclusion of PHPMailer libraries in WordPress (possibly from 3.8).

Things I think we need to consider:
1/ PHPMailer uses an AutoLoader that needs including now, should we move to a sub-folder like other external libraries to aid file management as we now have 3 or more files to manage
2/ Should we keep with the '.' file notation of PHPMailer now or continue renaming and editing files using WordPress '-' notation.
3/ What files from the PHPMailer library should we include? Languages? The Extras folder?

A starter patch is attached.

Change History (6)

7 years ago

#1 @bpetty
7 years ago

  • Cc bpetty added
  • Milestone changed from Awaiting Review to 3.8

I'll be back to this for a deeper review later here, likely adding some back compat API to go with this, but just some quick notes for now:

(1) Yes, I think it's time to move this to it's own folder since we're being pushed to add new file(s) for the first time in years.

(2) The only reason we keep renaming these files was for back compat purposes, and if this is moved to a new folder, we'll just end up either deciding to break this, or adding a bare placeholder include file in it's place. Either way, we should definitely stick with PHPMailer official filenames.

(3) I think @nacin has expressed that there's not any issues with including the entire library as intended, and really it's not that big. I'd like more input from others here as well. I personally think we should just include all of it as intended.

#2 @MattyRob
7 years ago

I've noticed an error in the attached diff in the file names - still using WordPress convention in pluggable but files not renamed in the PHPMailer AutoLoader. I've amended the pluggable name and the new attached patch works for me.

7 years ago

#3 @MattyRob
7 years ago

This patch also contains some of the code from an associated ticket: #18493

Last edited 7 years ago by SergeyBiryukov (previous) (diff)

#4 @SergeyBiryukov
7 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.