问题
How do I receive mail from Gmail within my ASP.NET application? Is there a Gmail API?
回答1:
Google allows one to enable IMAP support on their GMail account. Then you can use an IMAP library to access the inbox (i.e. read (mark) messages, delete messages etc.)
Of course, you don't have to use a library. You could implement your own IMAP client but a library will make it a lot easier for you.
Here are a couple of possible IMAP libraries for .NET:
interimap.codeplex.com/
www.rebex.net/mail.net/tutorial-imap.aspx
As @Douglas suggested, of course, IMAP need not be your only option. If you have a preference for POP3 you could just as well use a POP3 library.
来源:https://stackoverflow.com/questions/9235630/how-do-i-receive-mail-from-gmail-within-my-asp-net-application