gpt4 book ai didi

c# - 阅读 Gmail 收件箱

转载 作者:太空狗 更新时间:2023-10-30 01:10:35 28 4
gpt4 key购买 nike

我想使用 Google.GData.Client.dll 阅读我的 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

关于c# - 阅读 Gmail 收件箱,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4461946/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com