LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   A *surefire* mail server for a on demand site (https://www.linuxquestions.org/questions/linux-server-73/a-%2Asurefire%2A-mail-server-for-a-on-demand-site-644452/)

resetreset 05-24-2008 04:06 AM

A *surefire* mail server for a on demand site
 
Hello,
Assume I have a site where I'm selling say MP3's. Leaving the payment system aside, once the transaction is cleared, I'd like the server to EMAIL the file to the address the user just entered.

*Only* once the emailing is over must the system log the thing as having been sent, i.e. transaction completed.

If it crashes in the middle, of course, the "x" in the "Sent" column won't be there, and there must be a system to do the emailing later, but that is a secondary issue.


How can I do this?

IBall 05-24-2008 06:19 AM

Just a shell script should be able to do this.

You could write it in PHP (or any other language)

Basically, get send the mail using the mail command. If the mail sends OK, then write something to your log. If it fails, then log a different message.

You can then process the log in another process, and for each failed transaction do whatever you require.

--Ian


All times are GMT -5. The time now is 08:20 PM.