如何在ASP.NET应用程序中接收来自Gmail的邮件? [英] How do I receive mail from Gmail within my ASP.NET application?

查看:75
本文介绍了如何在ASP.NET应用程序中接收来自Gmail的邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在ASP.NET应用程序中接收来自Gmail的邮件?有Gmail API吗?

How do I receive mail from Gmail within my ASP.NET application? Is there a Gmail API?

推荐答案

Google允许Google在其GMail帐户上启用IMAP支持.然后,您可以使用IMAP库访问收件箱(即阅读(标记)邮件,删除邮件等)

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.)

当然,您没有使用图书馆.您可以实现自己的IMAP客户端,但是使用库可以使您轻松很多.

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.

以下是用于.NET的几个IMAP库:

Here are a couple of possible IMAP libraries for .NET:

www.rebex.net/mail.net/tutorial-imap .aspx

正如@Douglas所建议的,当然,IMAP不一定是您唯一的选择.如果您更喜欢POP3,则可以使用POP3库.

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.

这篇关于如何在ASP.NET应用程序中接收来自Gmail的邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆