Methods to read mailbox using PHP.
Posted: Tue Sep 02, 2003 4:23 am
I have a customer that wants to be able to send email to the news site I am building. An email will contain information that is supposed to be published on the site as "news".
To the customer I say: Yes! of course! Anything is possible!
But I am not 100% sure which way to go.
The server is a linux box running teapop for a pop server, but that might change to for example postfix or something (postfix is pop? isn't it? nevermind... That is off topic.).
The emails are recieved to a user account on the server that the website should check for mail.
This means I will need to let PHP open the mailbox, scan it, take any message in it and process it according to a given news mail syntax that I create. The latter is piece of cake. What I am wondering is how to read those mails from the spool/pop-server/whatever.
Has anyone done this before?
If noone directs me to do otherwise, my first attempt will be to examine the possibilities of locking, reading and updating the mail spool with the filesystem functions provided with PHP.
To the customer I say: Yes! of course! Anything is possible!
But I am not 100% sure which way to go.
The server is a linux box running teapop for a pop server, but that might change to for example postfix or something (postfix is pop? isn't it? nevermind... That is off topic.).
The emails are recieved to a user account on the server that the website should check for mail.
This means I will need to let PHP open the mailbox, scan it, take any message in it and process it according to a given news mail syntax that I create. The latter is piece of cake. What I am wondering is how to read those mails from the spool/pop-server/whatever.
Has anyone done this before?
If noone directs me to do otherwise, my first attempt will be to examine the possibilities of locking, reading and updating the mail spool with the filesystem functions provided with PHP.