Programmatically use Gmail to receive e-mail?

牧云@^-^@ 提交于 2019-12-05 01:38:08

问题


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.


回答1:


Use Gmail with IMAP.




回答2:


You can configure GMail to let you get at your mail with a POP3 client.




回答3:


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.



来源:https://stackoverflow.com/questions/342106/programmatically-use-gmail-to-receive-e-mail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!