Programmatically use Gmail to receive e-mail?

2019-03-30 02:48发布

I'd like to use a C# program to poll a gmail account and automatically download new messages. I know you can use gmail as an outbound SMTP server, but is there any way to access new messages sent to the account?

EDIT: Thanks for the rapid feedback....so I have two options, POP or IMAP.

Which one should I use? And why?

EDIT #2: Looks like IMAP allows me to not have to poll. Looks like the way to go.

3条回答
甜甜的少女心
2楼-- · 2019-03-30 03:35

You can get an Atom Feed of your GMAIL, which can be fetched with a regular web request, and parse as a regular XML document. I made a PHP page I could access from my phone (which doesn't support Atom Feeds, or pages as advanced as Google Mobile), to show me a list of new emails.

查看更多
Explosion°爆炸
4楼-- · 2019-03-30 03:55
登录 后发表回答