I want to use PHP to communicate with my mail server, using either Sendmail or qmail.
Essentially what I would like to do is to read the contents of a specific user's mail directory, parse the contents of any incoming message and then send a response to the sending address with information obtained from a database in the body of the message.
I am really only looking for help in initiating the conversation with the mail server. Once I know how to do this I have a pretty good idea of how to dissect header and body contents of the message.
If someone could post a simple example of how contact a mail server and retrieve a newly recieved message I would immensely appreciate it.
Thanks to anyone who can help.