我想使用Google.GData.Client.dll
阅读我的Gmail收件箱。我该如何做到这一点?我想要一个示例程序。阅读Gmail收件箱
回答
我发现GMailAtomFeed
// Create the object and get the feed
RC.Gmail.GmailAtomFeed gmailFeed = new RC.Gmail.GmailAtomFeed("username", "password");
gmailFeed.GetFeed();
// Access the feeds XmlDocument
XmlDocument myXml = gmailFeed.FeedXml
// Access the raw feed as a string
string feedString = gmailFeed.RawFeed
// Access the feed through the object
string feedTitle = gmailFeed.Title;
string feedTagline = gmailFeed.Message;
DateTime feedModified = gmailFeed.Modified;
//Get the entries
for(int i = 0; i < gmailFeed.FeedEntries.Count; i++) {
entryAuthorName = gmailFeed.FeedEntries[i].FromName;
entryAuthorEmail = gmailFeed.FeedEntries[i].FromEmail;
entryTitle = gmailFeed.FeedEntries[i].Subject;
entrySummary = gmailFeed.FeedEntries[i].Summary;
entryIssuedDate = gmailFeed.FeedEntries[i].Received;
entryId = gmailFeed.FeedEntries[i].Id;
}
还你应该看看
http://code.msdn.microsoft.com/CSharpGmail
http://weblogs.asp.net/satalajmore/archive/2007/12/19/asp-net-read-email.aspx
注意:此订阅源仅适用于Google Apps域上的Gmail帐户(它似乎没有提及任何有关付费与未付款的内容)。 https://developers.google.com/google-apps/gmail/gmail_inbox_feed – 2012-12-01 06:48:44
这是有效的,但仅用于检索电子邮件主题而不是主体。此外,您只能获得每个文件夹的前20个电子邮件。 – ytoledano 2014-03-30 21:10:54
使用aenetmail的IMAP客户端:github。我认为这是一个比GMailAtomFeed更好的替代方案,因为您可以检索整个电子邮件,并且有很多更多的选项。
下面是一个例子:
using (var ic = new AE.Net.Mail.ImapClient("imap.gmail.com", "email", "pass", AE.Net.Mail.AuthMethods.Login, 993, true))
{
ic.SelectMailbox("INBOX");
MailMessage[] mm = ic.GetMessages(0, 10);
// at this point you can download the messages
}
- 1. Gmail收件箱只读
- 2. 如何使用SoapUI阅读收件箱Gmail邮件
- 3. 为什么无法阅读Gmail的收件箱?
- 4. Gmail Api邮件阅读收件
- 5. 阅读与Zend框架的Gmail邮箱
- 6. javamail api访问Gmail收件箱邮件
- 7. 通过RSS读取Gmail收件箱供稿
- 8. IMAP访问Gmail收件箱与XOAUTH
- 9. 从c#获取gmail收件箱与GData
- 10. 收到的垃圾邮件gmail邮箱
- 11. Gmail的优先收件箱通过IMAP?
- 12. 使用您的GMail收件箱空间?
- 13. 通过Android访问Gmail收件箱
- 14. 从C#阅读Gmail#
- 15. 阅读用户的电子邮件收件箱
- 16. 从LumiSoft的Gmail收件箱收取邮件 - C#
- 17. Corona SDK。我如何从收件箱阅读短信?
- 18. 如何使用python sdk阅读您自己的Facebook收件箱?
- 19. 在我的收件箱中阅读短信消息
- 20. 如何在iPhone中以编程方式阅读SMS收件箱?
- 21. 我如何阅读Android手机中的收件箱?
- 22. 更快地阅读Java中的收件箱
- 23. Android 2.2阅读短信收件箱消息
- 24. 使用imaps登录到多个gmail帐户以阅读Java中的收件箱中的邮件
- 25. 使用android SDK阅读Gmail邮件
- 26. Zend_Mail - 通过POP阅读Gmail邮件
- 27. 阅读收件人MFMailComposer
- 28. Gmail API阅读消息
- 29. 在Android中阅读Gmail
- 30. 阅读Gmail失败与IMAP
谷歌是 – 2010-12-16 14:48:12
拿这里来看看你最好的朋友: https://developers.google.com/gdata/client-cs这是官方文档。如果你可以将你的问题分解成你想完成的具体的事情,我们可以帮助更多。 – Brad 2010-12-16 14:49:23