Last modified: 2010-05-15 15:59:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13094 - Incorrect Message with Pear Mail SMTP
Incorrect Message with Pear Mail SMTP
Status: RESOLVED DUPLICATE of bug 11567
Product: MediaWiki
Classification: Unclassified
Email (Other open bugs)
PC Linux
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2008-02-21 15:45 UTC by Gregory Gutt
Modified: 2010-05-15 15:59 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Gregory Gutt 2008-02-21 15:45:51 UTC
I have mediawiki installed on an ubuntu system w/php, apache and pear-php.  I have congirued mediawiki to use the smtp feature of pear mail. Example configuration code:

$wgSMTP = array(
 'host'     => "",
 'IDhost'   => "",
 'port'     => 25,
 'auth'     => true,
 'username' => "my_isp_username",
 'password' => "my_isp_password"

The method works.  However when a users goes to the preferences page and sends a test e-mail (with the confirmation code), the following message is returned:

Could not send confirmation mail. Check address for invalid characters.
Mailer returned: 1

Actually, the mail was sent and everything is OK.  I have tried this with several smtp servers.  My work around was to find the source of the message and change it.  The message is in the languages/messages directory in the file:  MessagesEn.php.  I changed the message to read:

"Your email has probably been sent.  This server can not confirm email transmission.  Please wait a few minutes and check your e-mail account."  

When I tested pear mail with a php script it appeared to report back the correct message.  So I think pear is working right.  I used the code below to test pear.

require_once "Mail.php";

$from = "Support <>";
$to = "User <>";
$subject = "Pear Test";
$body = "Testing Pear";

$host = "";
$port = "25";
$username = "xxxx";
$password = "xxxx";

$headers = array ('From' => $from,
  'To' => $to,
  'Subject' => $subject);
$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'port' => $port,
    'auth' => true,
    'username' => $username,
    'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
  echo("<p>" . $mail->getMessage() . "</p>");
 } else {
  echo("<p>Message successfully sent!</p>");
Comment 1 Brion Vibber 2008-02-26 23:33:27 UTC

*** This bug has been marked as a duplicate of bug 11567 ***

Note You need to log in before you can comment on or make changes to this bug.