To read incoming messages, you should use POP or IMAP.
To send messages, you should use SMTP.
Your choice of protocol depends on what you're trying to do and what the mail provider supports. (Gmail supports all three)
Use POP if you want to process all incoming messages without affecting them elsewhere.
Use IMAP if you want to manipulate the messages on the site (eg, to move them into folders).
Use SMTP to send email.
Manually scraping a webmail site (especially a modern AJAXy webmail site) is a recipe for disaster.