Hi,

I added smtp auth to the 4.7.x version. It was a quick and dirty hack that might be useful to some. My gut feeling is this could be mentioned in setup documentation, but no gui option. There is potential for mail abuse from weak sysadmins.

Here's the code I added to advuser.module:

require_once 'Mail.php';
$smtpinfo = '/usr/share/php/smtp-auth.php';
include ($smtpinfo);

The file smtp-info.php looks like:


$mail = Mail::factory('smtp',
        array('host'=>'your@SMTPServer.com',
        'username'=>'yourEmailAccount@SMTPServer.com',
        'password'=>'YourPassword',
        'auth'=>'TRUE',
        'timeout'=>'250'));

IMPORTANT NOTE: set smtp-auth as read-only by the user running php. (chmod 400) There's a password in there!

Any comments/suggestions are welcome. I'm a PHP beginner.

Comments

Anonymous’s picture

Status: Active » Closed (won't fix)

Old request.