Would it be best to read from gmail via pop3/imap? Or should/must I use an http script that actually logins in via web interface and gets all the emails that way?
Also, I would like to iterate this question for:
- live
- hotmail
- [any other major web mail provider]
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.