From: Brion Vibber Date: Mon, 12 Dec 2005 04:51:53 +0000 (+0000) Subject: * (bug 3211) Include Date, To mail headers when using PEAR::Mail X-Git-Tag: 1.6.0~953 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=1a21a9ad74f4d03a939ef03f37ae50366aaf4476;p=lhc%2Fweb%2Fwiklou.git * (bug 3211) Include Date, To mail headers when using PEAR::Mail --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 539513f9ab..9b6e16a3ea 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -313,6 +313,7 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 4001) Use local variables properly in wikibits.js akeytt() * Fix regression: old version missing from edit links on CSS/JS pages * (bug 3073) Keep search parameter on paging in Special:Newimages +* (bug 3211) Include Date, To mail headers when using PEAR::Mail === Caveats === diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 91899cd4a5..67c7176dce 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -56,10 +56,12 @@ function userMailer( $to, $from, $subject, $body, $replyto=false ) { $timestamp = time(); $headers['From'] = $from; + $headers['To'] = $to; if ( $replyto ) { $headers['Reply-To'] = $replyto; } $headers['Subject'] = $subject; + $headers['Date'] = date( 'r' ); $headers['MIME-Version'] = '1.0'; $headers['Content-type'] = 'text/plain; charset='.$wgOutputEncoding; $headers['Content-transfer-encoding'] = '8bit'; @@ -75,8 +77,10 @@ function userMailer( $to, $from, $subject, $body, $replyto=false ) { if ($mailResult === true) { return ''; } elseif (is_object($mailResult)) { + wfDebug( "PEAR::Mail failed: " . $mailResult->getMessage() . "\n" ); return $mailResult->getMessage(); } else { + wfDebug( "PEAR::Mail failed, unknown error result\n" ); return 'Mail object return unknown error.'; } } else {