Gmail’s POP3 behavior
First remember to enable POP3 in Gmail.
Gmail’s POP3 configuration maybe sometimes confusing.
In the Gmail’s web interface in “Settings” on “Forwarding and POP/IMAP” tab in “POP Download” you’ll find drop down list called “When messages are accessed with POP“.
Here’s the value list and the Gmail’s behavior:
- “keep Gmail’s copy in the Inbox”:
Message stays in the Inbox,
web interface says it’s unread,
message is not received for the second time when using POP3 client. - “mark Gmail’s copy as read”:
Message stays in the Inbox,
web interface says it’s read,
message is not received for the second time when using POP3 client. - “archive Gmail’s copy”:
Message is removed from Inbox by issuing GetMessageByNumber or GetMessageByUID command,
in web interface you can find it in ‘All Mail’,
message is not received for the second time when using POP3 client. - “delete Gmail’s copy”:
Message is deleted by issuing GetMessageByNumber or GetMessageByUID command,
in web interface you can find it in ‘Trash’ for 30 days,
message is not received for the second time when using POP3 client.
Recent mode
If you’re accessing Gmail on multiple clients through POP, Gmail’s ‘recent mode’ makes sure that all messages are made available to each client, rather than only to the first client to access new mail.
Recent mode fetches the last 30 days of mail, regardless of whether it’s been sent to another POP3 client already.
To enable recent mode you need to replace “username@gmail.com” specified in User property with “recent:username@gmail.com”.
Also you should not be using DeleteMessage or DeleteMessageByUID methods.
Consider using IMAP
If you want to have a greater control over your emails you should use IMAP protocol.
With IMAP you can:
- access emails in different folders
- copy or move messages between folders
- mark messages read/unread
- flag messages
- download emails’ basic information very fast
- use push email
Check POP3 vs IMAP for details.
Mail.dll contains ready to use IMAP client. Take a look on how to download email from Gmail using IMAP sample.
May 23rd, 2016 at 14:54
[…] You can read more about Gmail’s POP3 behavior. […]
December 13th, 2017 at 00:03
This is no help at all. My mailbox doesn’t even open, won’t even close!
December 13th, 2017 at 11:23
@Sherry,
What is your problem exactly? Are you getting any exception? Are you using Mail.dll?