Last modified: 2010-05-15 15:59:40 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' => "smtp.myisp.net", 'IDhost' => "earthlink.net", '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. <?php require_once "Mail.php"; $from = "Support <support@xxxx.com>"; $to = "User <user@xxxx.com>"; $subject = "Pear Test"; $body = "Testing Pear"; $host = "smtpout.xxx.com"; $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>"); } ?>
*** This bug has been marked as a duplicate of bug 11567 ***