PHP Mail via Exim Better Return Primer Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

PHP Mail via Exim Better Return Primer Tutorial

PHP Mail via Exim Better Return Primer Tutorial

We are exploring a way to improve on the PHP mail return value telling you nothing about whether the email gets off to the intended recipient. One step, here at RJM Programming, is to verify if the email has immediately been sent off according to our Exim mail server logs.

We are turning to a crontab operated (ie. scheduled) call to a new โ€ฆ

โ€ฆ to, in our MAMP local Apache web server wooooorrrrrlllllddd would work with either โ€ฆ



echo '/Applications/MAMP/htdocs/ "2022-12-20 11:4[01]"' > snapshotexim.txt

ksh ./snapshotexim.ksh # may populate /Applications/MAMP/htdocs/snapshotexim.php

โ€ฆ or โ€ฆ



echo '' > snapshotexim.txt

ksh ./snapshotexim.ksh /Applications/MAMP/htdocs/ "2022-12-20 11:4[01]" # may populate /Applications/MAMP/htdocs/snapshotexim.php

โ€ฆ methodologies to place a relevant โ€œsliceโ€ (dated 2022-12-20 11:40 or 2022-12-20 11:41) of the Exim mail server log into a file in our Apache web serverโ€™s Document Root called snapshotexim.php for ongoing local work to follow.

We prefer the first way because our future PHP interfacing can better write out โ€œthe intelligenceโ€ into snapshotexim.txt itself.

Up with crontab, in a Korn Shell procedure that runs every minute, we place (code like) โ€ฆ



if [ -f "$HOME/snapshotexim.txt" ]; then

if [ -f "/etc/init.d/snapshotexim.ksh" ]; then

ksh /etc/init.d/snapshotexim.ksh

fi

fi

โ€ฆ ready for our journey of discovery to continue!

Did you know?

If you are thinking of implementing a solution of this ilk, within the next phase of the procedures weโ€™ll tackle into the future, you will need a PHP reader of snapshotexim.php above, via file_get_contents or HTML and Javascript and Ajax reader such as eximsnapshotโšซphp as some sort of starting point.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Operating System, Software, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *