On Thu, May 8, 2008 at 11:45 AM, Helmut Schneider jumper99@gmx.de wrote:
Helmut 'Ingrid' Schneider jumper99@gmx.de wrote:
I'm using Mediawiki 1.12 in a chroot'ed environment. I'm used to use mini_sendmail in those environments but without luck with mediawiki:
UserMailer::send: sending mail to Abcdef helmut@domain.tld Sending mail via internal mail() function Error sending mail
What do I need to use either sendmail to send mails from mediawiki or to use the "internal mail() function"? Is it phpmailer? Can I rise the debug output to get more information?
http://www.mediawiki.org/wiki/Manual:$wgSMTP and copy all PEAR files into the jail. If one has a solution using sendmail I'd be pleased to hear about.
One time I hacked up UserMailer.php (from 1.9.3) to deal with a restrictive environment. Use with caution:
% diff mediawiki-1.9.3/includes/UserMailer.php UserMailer-hacked.php 87c87 < require_once( 'Mail.php' ); ---
// local edit - require_once( 'Mail.php' );
106c106 < $mail_object =& Mail::factory('smtp', $wgSMTP); ---
/* local edit - $mail_object =& Mail::factory('smtp', $wgSMTP);
110c110,129 < } ---
} */ // wfDebug( "Sending mail via PEAR::Mail to $dest\n" ); wfDebug( "Sending mail via phpmailer to $dest\n" ); // $mailResult =& $mail_object->send($dest, $headers, $body); require("c:\php\includes\class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "SOMEHOST"; $mail->SMTPAuth = true; $mail->Username = "SOMEUSERNAME"; $mail->Password = "SOMEPASSWORD"; $mail->From = "SOMEEMAIL"; $mail->FromName = "SOMEFROMNAME"; $mail->AddReplyTo("SOMEEMAIL"); $mail->AddAddress($dest); // $mail->IsHTML(true); $mail->Subject = $headers['Subject']; $mail->Body = $body; $mail->Send();
112,113c131,132 < wfDebug( "Sending mail via PEAR::Mail to $dest\n" ); < $mailResult =& $mail_object->send($dest, $headers, $body); ---
// just return true for now return '';
116c135 < if ($mailResult === true) { ---
/* local edit - if ($mailResult === true) {
124c143 < } ---
} */
Joshua