per intercettare le mail, devi usare l'imap

http://it.php.net/manual/it/ref.imap.php