January 7

MediaWiki: Setting up Email / SMTP service with Pear mail

Install pear mail:

yum install php-pear
pear install mail
pear install Net_SMTP
pear install Auth_SASL
pear install mail_mime

service httpd restart

Add the following to the LocalSettings.php file in your Mediawiki folder:
$wgSMTP = array(
 'host'     => "mail.example.com", // could also be an IP address. Where the SMTP server is located
 'IDHost'   => "example.com",      // Generally this will be the domain name of your website (aka mywiki.org)
 'port'     => 25,                 // Port to use when connecting to the SMTP server
 'auth'     => true,               // Should we use SMTP authentication (true or false)
 'username' => "my_user_name",     // Username to use for SMTP authentication (if being used)
 'password' => "my_password"       // Password to use for SMTP authentication (if being used)
);


Copyright 2021. All rights reserved.

Posted January 7, 2014 by Timothy Conrad in category "Websites

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B