This module adds support for using an external SMTP server in addition to the built-in PHP mail() function. The PHPMailer library is required and must be separately installed.
The PHPMailer library must be installed to the plugins/PHPMailer/ directory so that (for PHPMailer version 6+) the PHPMailer.php file is found at plugins/PHPMailer/src/PHPMailer.php or plugins/PHPMailer/PHPMailer.php. In order to use PHPMailer from another directory, modify the MOD_MAIL_PHPMAILER_DIR constant in the module.inc file.
For PHPMailer <= 5.2, the file PHPMailerAutoload.php must be in plugins/PHPMailer/PHPMailerAutoload.php, and module/mail/module.inc edited to remove the two use lines atop the file.
The SMTP server must support multiple repeated connections. For example, if the Chair is sending an email to all contact authors and there are 100 submissions, the SMTP server will receive 100 connections, one after the other. If the SMTP server is slow, does rate limiting, or PHP is configured with a short script execution time, messages may fail.
Mail options are defined via this module's settings. PHPMailer must be installed prior to accessing the settings.
If possible, enter the SMTP server's IP address for the SMTP Host to speed up processing by saving the DNS lookup.
A link is displayed at the bottom of the module's settings page to send a test message using the active mailer.
Once configured, this module works without user intervention.
The SMTP server account username and password may optionally be set directly atop the module.inc file found in the module's directory -- see the section // SMTP Auth.
Version 1.0.1
- Updated to support PHPMailer 6
Version 1.0.0
- Initial Release