Page MenuHomePhabricator

Any mediawiki mail functions are potentially blocked by missing "space"in php mail() call in UserMailer::userMailer()
Closed, ResolvedPublic

Description

Any mail function within MediaWiki (mail a new password, email user, confirm
email, ENotif) is potentially(*) broken in a certain php version [1] due to a
missing space. This has been reported by a user.

Fix by adding an additional space after the "-f" option letter.

Example 3 in [2], which was used when implementing this in UserMailer.php, does
not show the space, but it helped to get a touchy php mail() implementation running.

Therefore I suggest to change line 132 in UserMailer.php from
mail( wfQuotedPrintable_name_and_emailaddr($to), $subject, $body, $headers,
"-f{$wgEmergencyContact}\n");
to
mail( wfQuotedPrintable_name_and_emailaddr($to), $subject, $body, $headers, "-f
{$wgEmergencyContact}\n");

[1] PHP: 4.3.10 (apache)
[2] http://www.php.net/manual/en/function.mail.php


Version: 1.5.x
Severity: critical
URL: http://www.php.net/manual/en/function.mail.php

Details

Reference
bz2105

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 21 2014, 8:29 PM
bzimport set Reference to bz2105.
bzimport added a subscriber: Unknown Object (MLST).
Wikinaut created this task.May 8 2005, 5:56 AM

wegge wrote:

Not a PHP problem, but a problem with some implementations of the sendmail
executable. Fixed in HEAD.