The IMAP (Internet Message Access Protocol) support allow to interact from PHP with a IMAP server. It can read, after authentication, the user mailbox and drive it.
The server can be secured by SSL. Then the IMAPS protocol is used, with a parameter to check or not the server certificate.
It can list, read the mails, move or delete one or multiple ones. It manage the folders (list, add, delete, subscribe, unsubscribe). It is also capable to read the quota state and define the mail flags.