- Create a folder to store the script and the mail logs.
mkdir /somewhere/phpmail
mkdir /somewhere/phpmail/mails- Place the
logmail.shscript in thephpmailfolder - Make sure the php process has write access to this folder:
chmod -R 777 /somewhere/phpmail- Open the
php.iniconfig file and edit the sendmail_path parameter:
On archlinux:
/etc/php/php.ini
sendmail_path = "/somewhere/phpmail/logmail.sh"- If running php via webserver, you have to restart the webserver.