This core function is also used by plugins sending Email which means that other software running under WP may not work properly.
NOTICE in the date format function, the timezone offset is hard coded to ‘0’ in the original code. This is a dead give away that no one else has looked at this.
What is really troubling me is that I’m the only one who has identified this issue and addressed it. Can the wp team correct whatever isn’t working properly or coded properly so that this doesn’t have to be a hack?
We came up with this hack, which we have implemented manually on our hosted websites and it’s working great.
The issue is in /wp-includes/class-phpmailer.php in the function rfcDate()
/**
* Return an RFC 822 formatted date.
* @access public
* @return string
* @static
*/
public static function rfcDate()
{
//Set the time zone to whatever the default is to avoid 500 errors
//Will default to UTC if it's not set properly in php.ini
//Code in the distribution
//date_default_timezone_set(@date_default_timezone_get());
//return date('D, j M Y H:i:s 0');
//Fix - Hard coded hack in our hosted installations
date_default_timezone_set('US/Central');
return date('D, j M Y H:i:s -0500');
}
I want to point out that we have verified system timezone settings and have played with the php.ini by changing the timezone by hard coding it to something other than UTC / GMT – regardless, this function returns the exact same time and offset.
]]>Below are the recently upload scripts that contain code to send email. You may wish to inspect them to ensure they are not sending out SPAM.
[Excessive code moderated and post re-constructed manually]
]]>I know its a server problem. Support gave me a suggestion but it didn’t work. I’m still waiting for them to reply back.
They suggested to take out a line of code on the class-phpmailer.php
The following code was a duplicate code 769:
$rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);
Anyone ever dealt with this matter?
]]>usleep(300000);
I need this to get/send all of the letters. Could you help me pls – what (code) should I put into a plugin (I am creating my own plugin for some things) to to add usleep to class-phpmailer.php by plugin(/hooks or smth else)?
]]>First of all, the upgrade to 2.5.1 is really good to me. I think it all has improved a lot!
There’s however a small problem in the file “wp-includes/class-phpmailer.php”
At line 156 it sets the variable $Host at “localhost”
Now this will be good for 99% of the users, but not for everyone. The host is already defined in the config.php, and so it would be better to get that variable from there.
For now I’ve edited the file and changed “localhost” into what I need, but this means that with every upgrade, I’ll have to edit that cause otherwise I won’t be able to send out emails.
It would be really nice if this could be fixed in the new WordPress Release
Thanks!
]]>