by
KK » Mon Feb 01, 2016 7:04 am
OK, I'm attaching an addon that should make both <cms:send_mail> tag as well as the internal Couch mail function to begin using PHPMailer instead of PHP's native mail() function.
However before we install this addon, we need to make one change to your existing Couch installation (I'm assuming that you are using Couch v1.4.7 - if not you really should upgrade to it).
Attached to this post is a 'functions.zip'. Extracting it will yield a file named 'functions.php'.
Place this file within your installation's 'couch' folder (thus replacing an existing core file of the same name).
Note: This step is required only for the current v1.4.7. Next releases will have the changes already incorporated.Ok, so with that done, we can now install the addon.
Installation:Extract the attached 'phpmailer.zip' to get a folder named 'phpmailer'.
Place this folder within your installation's 'couch/addons' folder.
Now edit the kfunctions.php found in the 'couch/addons' folder (you might need to rename kfunctions.example.php to kfunctions.php) and add the following line to activate this addon -
- Code: Select all
require_once( K_COUCH_DIR.'addons/phpmailer/phpmailer.php' );
Configuration:Within the 'couch/addons/phpmailer' folder you'll find a file named 'config.example.php'.
Rename it to 'config.php'. Now edit it to add your GMail account's name and password in the following fields -
- Code: Select all
$cfg['username'] = 'your_email@gmail.com';
$cfg['password'] = 'your_password';
And that should be it. Now both the <cms:send_mail> tag as well as the functions called internally by e.g. the forgot-password routines should begin using PHPMailer's SMTP method for sending emails.
Please try it out and let me know if this works as expected.
In case it does not, please get me temporary access to your setup to allow me troubleshoot.
Hope it helps.