I had asked this question a few days ago myself. And have been scouting
google for the answer. To be honest, I did get quite a few answers.
But, the problem lay in finding the compatible tool for my installation.
My limitations were:
- I do not own the server
- I cannot install or uninstall any tool on to the server
- The server help was not very familiar with the installation either
- I had to scout the server details (info like the MTA used by the server)
So, was born a script that does not rely on the server configuration, for sending mail.
This script is in php (I tried to use the formmail script, but found that
this is easier) and relies on direct communication with the SMTP server to send mail.
The script uses SMTP AUTHentication for sending mail. This script assumes that you are using the Exim MTA for your email transport.
As you see in the script, though the SMT Protocol (SMTP) is standard, the request and response for different servers are slightly differen…