I am looking for a script that is capabale of receiving mail from sendmail and store them into my database system. Is this possible? The script would have to listen and therefore run continuosly.
The reason for this would be that I want to combine my internal database driven mail system with outside emails so that the admin can see all in one admin tool.
Receiving mail using php
Moderator: General Moderators
You just need to set up sendmail to forward the relevenat emails to a php script which can then do whatever you want with the contents of the email.
http://www.evolt.org/article/Incoming_M ... /18/27914/ has an example.
http://www.evolt.org/article/Incoming_M ... /18/27914/ has an example.
A nice and hard to find tutorial on this subject :
http://www.linuxscope.net/articles/mail ... tsPHP.html
Exactly what you're looking for (except it doesn't use sendmail):
http://sourceforge.net/project/showfile ... _id=104718
http://www.linuxscope.net/articles/mail ... tsPHP.html
Exactly what you're looking for (except it doesn't use sendmail):
http://sourceforge.net/project/showfile ... _id=104718