Hi,
can someone more familiar with the mail feature please take care of this?
Thanks,
Magnus
Original mail from : Tony Weber
Message body follows:
Hi,
I recently installed Media Wiki, and email would not send.
It happens
because some email server refuse bare LF in the email body. See
http://cr.yp.to/docs/smtplf.html. Media Wiki code composes
email body
with bare LF "\n" instead of CRLF "\r\n". The fix is
simple: replace
all bare LF with CRLF.
In the file UserMailer.php, add a line immediately after the
function
userMailer():
--- BEFORE ---
function userMailer( $to, $from, $subject, $body,
$replyto=false ) {
global $wgUser, $wgSMTP, $wgOutputEncoding, $wgErrorString,
$wgEmergencyContact;
--- AFTER ---
function userMailer( $to, $from, $subject, $body,
$replyto=false ) {
global $wgUser, $wgSMTP, $wgOutputEncoding, $wgErrorString,
$wgEmergencyContact;
$body = preg_replace("/^(?=\n)|[^\r](?=\n)/", "\\0\r",
$body); //
replace LF with CRLF: see
http://cr.yp.to/docs/smtplf.html
This regular expression matches all characters which precede
"\n" except
"\r". It then replaces them with the original character
(\\0) plus
"\r". As a special case, it also matches a "\n" as the
first character,
and replaces it with "\r\n".
Best regards,
Tony