WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#15912 closed defect (bug) (fixed)

PHP Mailer Upgrade

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

Description

With WordPress 3.2, PHP 5 will become a requirement.

PHPMailer should therefore be updated to the code specific for PHP5 rather than the current 2.0.4 version which is for PHP4.

Attachments (2)

15912.001.diff (156.4 KB) - added by cnorris23 10 years ago.
15912.002.diff (124.9 KB) - added by MattyRob 10 years ago.

Download all attachments as: .zip

Change History (15)

#1 @nacin
11 years ago

  • Component changed from Mail to External Libraries
  • Keywords 3.2-early added; PHPMailer removed
  • Milestone changed from Awaiting Review to Future Release

#2 @cnorris23
10 years ago

  • Keywords has-patch needs-testing added

Update to PHPMailer to version 5.1. FWIW, I've been using 5.1 on a BuddyPress site since late-2.9.x/3.0 with no problems (that I've noticed).

@cnorris23
10 years ago

#3 follow-up: @MattyRob
10 years ago

I'm not sure if this needs another ticket or if it can be done here but while we are updating class-phpmailer.php should we update class-pop3.php from the same source too?

I'll try to get a patch upload from home later today that does this.

#4 @MattyRob
10 years ago

Patch for class-pop3.php and class-phpmailer.php

#5 in reply to: ↑ 3 @aaroncampbell
10 years ago

Replying to MattyRob:

I'm not sure if this needs another ticket or if it can be done here but while we are updating class-phpmailer.php should we update class-pop3.php from the same source too?

Yes it should, but I think it does. The 001 patch looks to me like it patches class-phpmailer.php, class-pop3.php and class-smtp.php (which should all upgrade together).

The new 002 patch, however, seems to be missing the class-smtp.php file.

#6 @MattyRob
10 years ago

@aaroncampbell,

Sorry my mistake, I should have said only class-phpmailer.php and class-smtp.php because the current class-pop3.php file is from the SquirrelMail package, not PHPMailer.

I'll have another go at the patch later to only replace the class-phpmailer.php and class-smtp.php files.

#7 @MattyRob
10 years ago

I'll get a patch uploaded later but the phpmailer class needs a small amend on line 702. Here the phpmailer class calls the SMTP class but because WordPress changes the file names it falls over.

So, either WordPress needs to use the original filenames or we need to check and make sue they are changes to the WordPress equivalents within the files.

#8 @cnorris23
10 years ago

@MattyRob The patch is correct. The pop3 class is what's included with the PHPMailer 5.1 download. They're doing what WP is doing and using external libraries. As far as changing the file name for include, that isn't needed. WP handles this on it's own.

#9 @westi
10 years ago

  • Keywords has-patch removed

class-pop3.php is not from PHPMailer so please don't touch it in any patches.

This comes from SquirrelMail and says so clearly in it's headers - it is not to be changed and is used by the core post-by-email code which is not in active support - we just haven't ripped it out yet because there isn't a drop-in replacement plugin we can recommend at the moment.

#10 @MattyRob
10 years ago

  • Keywords has-patch added; needs-testing removed

Okay, updated patch attached now that replaces the phpmailer and smtp files, renames them to the WordPress current naming convention and fixes the include statement in the phpmailer class that calls the smtp file. I've tested this with a custom PHPMailer filter plugin that forces emails through SMTP and it works. for me on a 3.1 installation.

@MattyRob
10 years ago

#11 @aaroncampbell
10 years ago

Regarding the SquirrelMail POP3 class, see #17064

#12 @ryan
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [17676]) Update phpmailer and smtp to 5.1. Props MattyRob cnorris23. fixes #15912

#13 @ryan
10 years ago

  • Milestone changed from Future Release to 3.2
Note: See TracTickets for help on using tickets.