#9697 closed enhancement (fixed)
Update PHP mailer to latest version [ 2.0.4 ]
Reported by: | Simek | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.7.1 |
Component: | Keywords: | needs-patch dev-feedback | |
Focuses: | Cc: |
Description
Update PHP mailer to lates version - 2.0.4. Until WordPress supports PHP4 we can't upgrade this script to true latest version but it isn't very important component which make a pressuer to drop out PHP4 support.
Changelog since actual version in WordPres:
Version 2.0.4 (April 02 2009) * fixed == in class.smtp.php - NOTE: this is it folks, our last PHPMailer to support PHP4 Version 2.0.3 (November 08 2008) * fixed line 1041 in class.smtp.php (endless loop from missing = sign) * fixed duplicate images in email body * removed English language from language files and made it a default within class.phpmailer.php - if no language is found, it will default to use the english language translation * corrected $basedir to $directory * changed default of $LE to "\r\n" to comply with RFC 2822. Can be set by the user if default is not acceptable * removed trim() from return results in EncodeQP * changed $this->AltBody = $textMsg; to $this->AltBody = html_entity_decode($textMsg); * We have removed the /phpdoc from the downloads. All documentation is now on the http://phpmailer.codeworxtech.com website.
Attachments (4)
Change History (33)
#5
@
15 years ago
we might as well upgrade this to the latest (and last, until we switch to php5).
and possibly patch it a little, too. namely on the html_entity_decode() call, to add a charset if needed (with an @, to avoid the pesky php4 issues with utf-8).
#6
follow-up:
↓ 7
@
15 years ago
I patched this one according to the changes in the old one but not one areay. I will take a look into it again after your comment.
Further I was now able to test the patch by sending out registration emails. Looks good to me so far:
Return-Path: <artnorm@googlemail.com> Received: from xxx.gmail.com (xxxxxxxxx) by mx.google.com with ESMTPS id j9sm10880067mue.51.2009.05.02.07.04.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 02 May 2009 07:04:56 -0700 (PDT) To: xxxxxx@gmail.com Subject: [wordpress-trunk] Your username and password Date: Sat, 2 May 2009 16:05:35 +0200 Return-Path: wordpress@192.168.2.106 From: WordPress <xxxxxxxxxx@xxxxxxxxx> Message-ID: <8d3aa4a41692c5d4f0e98eb3fa4b1add@192.168.2.106> X-Priority: 3 X-Mailer: PHPMailer (phpmailer.sourceforge.net) [version 2.0.4] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="UTF-8" Username: xxxxx Password: xxxxxxxxxx http://192.168.2.106/wordpress-trunk/wp-login.php
This is the latest phpmailer version for php 4 as far as I'm concerned.
#7
in reply to:
↑ 6
@
15 years ago
Replying to hakre:
This is the latest phpmailer version for php 4 as far as I'm concerned.
Yeah. It's documented as dead branch material, too. So better than (with the latest fixes) than our current one.
#8
@
15 years ago
Here is something I can not confirm that the change has been made correct. Change from:
{{{ /* There should not be any EOL in the string */
$encoded = preg_replace("/[\r\n]/", , $str);}}}
To:
{{{ /* There should not be any EOL in the string */
$encoded = preg_replace("[\r\n]", , $str);}}}
The later one will only remove the strings "\r\n" and not any combination of "\r" and "\n". The code is related to quoted printable ( function EncodeQ() ). I'm not well with quoted printable and do not understand fully the term EOL here.
But what I can say is, that it is not explicitly named in the changelog and therefore I assume that this might be an accident. Another Sign of that being an accident is the case, that it is not a valid pcre pattern. the starting and ending delimiter have been left out. as far as i know this is not possible.
I will try to pose the question with the phpmailer project. Until that I suggested to patch this place it.
#9
follow-up:
↓ 10
@
15 years ago
- Keywords needs-patch added; has-patch dev-feedback removed
I'm pretty sure that EncodeQ_callback et all were added by WP to avoid using the /e suffix in regex, due to some hosts failing because of safe_mode or some stuff like that.
#10
in reply to:
↑ 9
@
15 years ago
Replying to Denis-de-Bernardy:
I'm pretty sure that EncodeQ_callback et all were added by WP to avoid using the /e suffix in regex, due to some hosts failing because of safe_mode or some stuff like that.
thanks for poiting to it, completely right. i updated the patch to remove the /e switches.
additionally there seems to be a Bug in the current version. preg_replace_callback() needs a valid callback as second parameter. the provided value is not a valid callback value (tested with php 5). this bug has been removed in the updated patch as well.
#12
@
15 years ago
- Keywords has-patch added; needs-patch removed
patch I added to #9722 uses a static call for the callback, to make things less memory hungry in php4.
#13
@
15 years ago
Updated to static function callbacks. Suggested by Denis-de-Bernardy:, See #9722
Denis, I am not shure that this is less memory hungry since the instance of $this already is there. Please teach me :D
#14
@
15 years ago
in php4, array($this, "foo") generates a clone, as opposed to array(&$this, "foo")
#19
@
15 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from 2.8 to Future Release
patch is b0rke + the comment on #7474 needs to be looked into
#21
@
15 years ago
- Keywords dev-feedback added
http://core.trac.wordpress.org/ticket/7474#comment:7 suggests there were a few security-related commits on the existing file.
http://core.trac.wordpress.org/log/trunk/wp-includes/class-smtp.php does seem to reveal anything, though.
#22
@
15 years ago
I read 7474#comment:7 in that way, that it is talking about the security realted commits within the phpmailer project. I read your words that you interprete them as changes in WordPress codebase. So in my eyes good to go.
#24
@
15 years ago
- Summary changed from Update PHP mailer to lates version [ 2.0.4 ] to Update PHP mailer to latest version [ 2.0.4 ]
i still have no access there. problems getting registered.
See also: #8800