https://www.slackwiki.com/index.php?title=Mediawiki_E-Mail&feed=atom&action=historyMediawiki E-Mail - Revision history2024-03-29T14:50:09ZRevision history for this page on the wikiMediaWiki 1.40.0https://www.slackwiki.com/index.php?title=Mediawiki_E-Mail&diff=134&oldid=prevErik: Copy from old2009-06-04T05:19:19Z<p>Copy from old</p>
<p><b>New page</b></p><div>[[Category:Tips]]<br />
<br />
==Can't Send Out Confirmation E-mails (using SMTP)==<br />
(confirmed on Slackware 10.2 & Mediawiki 1.7.x)<br><br />
To use SMTP on Mediawiki 1.5+ you must add:<br><br />
$wgSMTP = array(<br />
'host' => "<i>your.smtp.server</i>",<br />
'IDHost' => "<i>your domain or blank</i>",<br />
'port' => 25,<br />
'auth' => true <i>(or false)</i>, <br />
'username' => "<i>username (if auth=true)</i>",<br />
'password' => "<i>password (if auth=true)</i>"<br />
);<br><br />
<br />
:::...somewhere into LocalSettings.php (found in the Mediawiki's root directory).<br />
<br />
<br />
<br />
After adding the above to your LocalSettings.php file, the SMTP service still <i>probably</i> will <b>not</b> work. If you examine your <code>/var/log/apache/error_log</code> file, it probably will have this error:<br><br />
<br />
<code>[error] PHP Warning: usermailer(Mail.php): failed to open stream: No such file or directory in /home/joebleau/public_html/wiki/includes/UserMailer.php on line 82</code><br />
<br />
<br />
<br />
For some reason, the Wiki's config script screws up the path to the PHP's PEAR extensions. To fix this, edit the LocalSettings.php line that says:<br><br />
::<code>$path = array( $IP, "$IP/includes", "$IP/languages");</code><br />
<br />
to say:<br />
<br />
::<code>$path = array( $IP, "$IP/includes", "$IP/languages"<b>, "/usr/lib/php"</b> );</code><br />
<br />
After that, your smtp outgoing mail <i>should</i> work for your Mediawiki installation.</div>Erik