tags:

views:

137

answers:

2

Hi,

Lets say I have a web application on web.com and I want to scan email address [email protected]. Based on sender email address I want to put email content on user account in web.com. Web.com is PHP application. Is there any simple way to hook up to mail server to be notified when new mail arrives ?

+4  A: 

Yes. If you have a mail server set up already which supports either POP3 or IMAP, you can access your email directly with PHP.

A lot depends on your current set up and requirements so I'll just point you at some related questions already on SO:

If you are desperate, you can even use MS Exchange... :)

If you don't already have a mail server, there is some information on setting one up on ServerFault:

You said about being notified when new mail arrives. It is more usual to poll a mailserver at intervals, but if you require notifications, there is some of discussion of this here:

Colin Pickard
A: 

This is often handled by piping e-mail to a PHP script.

ceejayoz