我正在嘗試使用Limilabs IMAP庫連接到電子郵件;Limilabs IMAP異常
tcpc = new System.Net.Sockets.TcpClient("imap.gmail.com", 993);
正常工作;而limilabs IMAP不
using (Imap imap = new Imap())
{
imap.Connect("imap.gmail.com", 993);
給出了異常:
Limilabs.Client.ServerException was unhandled
HResult=-2146233088
Message=Tried to read a line. No data received. Please make sure that antivirus and firewall software are disabled or configured correctly.
Source=Mail
StackTrace:
at .()
at .(MemoryStream)
at .()
at Limilabs.Client.IMAP.ImapResponse.(Stream)
at Limilabs.Client.IMAP.Imap.(ImapResponse)
at Limilabs.Client.IMAP.Imap.(String , Boolean)
at Limilabs.Client.IMAP.Imap.ReceiveResponse(String tag)
at Limilabs.Client.IMAP.Imap.wqf45mzzsju7786nbrb2h8aclqm8jmnx ()
at Limilabs.Client.ClientBase.Connect(String host, Int32 port, Boolean useSSL)
at Limilabs.Client.ClientBase.Connect(String host, Int32 port)
at ConsoleIMAP.Program.Main(String[] args) in c:\users\hmohamed\WcfServiceLibrary1\ConsoleIMP\Program.cs:line 136
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
HResult=-2146233088
Message=Tried to read a line. No data received.
Source=Mail
StackTrace:
at .()
InnerException:
讓我猜猜,Limilabs預計不使用TLS說話IMAP,Gmail的IMAP預計使用TLS,並因此他們沒有給對方說話過? – arnt 2014-10-20 07:23:57
所以我可以嘗試hotmail! – kobosh 2014-10-20 15:10:56
嘗試connectssl,但它超時 – kobosh 2014-10-20 16:39:21