用于访问Gmail的IMAP

用于访问Gmail的IMAP

本文介绍了用于访问Gmail的IMAP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 你好朋友, 我正在使用IMAP来阅读来自gmail的邮件,我用30天的试用版下载dll。 IS IMAP DLL在.NET的某些地方 或 我可以购买IMAP dll吗? 请回复Hello friends,I am using IMAP tto read mail from gmail for which I downlaod dll with 30days trial pack.IS IMAP DLL is in some where in .NETORCan I get IMAP dll without purchasing It?Please Reply推荐答案ImapClient objclient = new ImapClient();objclient.UserName = "******@gmail.com";objclient.Password = "*******";objclient.Port = 993;objclient.Host = "imap.gmail.com";//"imap.****.****.com";if (objclient.Connect()){ if (objclient.SetFolder("Inbox")) { Dictionary<string, string> messageIds = objclient.SearchMails(ESS.Network.eMailStatus.ALL); IDictionaryEnumerator ienum = messageIds.GetEnumerator(); while (ienum.MoveNext()) { string messageId = (string)ienum.Key; string msguid = (string)ienum.Value; string emlstr = string.Empty; objclient.GetMail(messageId, ESS.Network.eMailIdType.MESSAGEID, ref emlstr); //emlstr - contains entire email } }} 这篇关于用于访问Gmail的IMAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-25 19:49