As there are issues with sending reports from PresStore to mail servers that require smtp authentication, I've created a script based on another script by Heinz Tschabitscher that will do this.
You will need php and pear installed on the server, but obviously this means it will work on Windows, linux and OSX.
Check to see if you have pear installed
$ pear version
If you don’t have it installed, you will need to install pear,
OSX 10.9 ( might work for other versions as well )
cd /usr/lib/php sudo php ./install-pear-nozlib.phar edit /etc/php.ini and add /usr/lib/php/pear to the include paths
Others
see here for info:
Check to see if the Mail Class is Installed
pear list-files Mail
If you don’t get anything then install it !
sudo pear install mail
You will also need Net_SMTP
sudo pear install Net_SMTP
Install the Scripts
Download the scripts and install them on the server, i normally create a folder called /scripts on the root of the drive and put them in there, just remember where you put them as you will need the path later!
Configure the Scripts
Edit the smtp_conf.php file and configure the relevant info:
$host = "mail.example.com";
$username = "user";
$password = "password";
$default_from="server@example.com";
$host = smtp server
$username = account to auth with
$password = account password
$default_from = from account to use if none is specified by the call ( ie presstore !)
Configure PresStore
Edit the client settings in PresStore and specify the external script as the mail sender:
Edit the user settings and specify the email address to send to:
Test It
Click apply and the click the Send Test email button, if all is well you will get an email!
If not, check the php error log. This will either be the log file set in php.ini, the apache error log, or the system log depending on your configuration!
No comments:
Post a Comment