Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.7.3, 1.8.3
-
Component/s: Administration
-
Labels:None
-
Environment:Redhat Enterprise 4.0, Apache2, PHP5.1
-
Database:Any
-
Affected Branches:MOODLE_17_STABLE, MOODLE_18_STABLE
-
Fixed Branches:MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
Description
We have been alerted that some of our users e-mails (sign-up) were not being delivered. After hours of investigating the problem we found that the problem was an incorrect timezone header in the e-mail that was generated by Moodle (it inserted +1080 as the UTC offset which is illegal). Because of the illegal header the SPAM and AV Gateway was dropping the e-mail as SPAM.
After working our way through the code it looks like there is a problem with the PHPMailer code (lib/phpmailer/class.phpmailer.php) that will effect half hour time-zones (such as Central Australian Standard Time Australia/Adelaide +1030 or Indian Standard Time India/Mumbai +0530).
The line:
$tz = ($tz/3600)*100 + ($tz%3600)/60;
in function RFCDate() should be replaced with
$tz = (($tz - ($tz%3600) )/3600)*100 + ($tz%3600)/60;
It seems that this has been already discussed at the PHPMailer mailinglist on SourceForge, however I could not see if a patch has been released.
I have currently patched our Moodle Installations with this patch.
Cheers,
Leo
tested and committed into cvs, thanks for the report and patch
link to sf report: http://www.nabble.com/small-bug-in-timezone-code-to13320733.html#a13320733