I'm getting the following error intermittently. It is able to connect now and again, however, in most instances it errors when calling "imap.UseBestLogin(_user, _password)" with "Tried to read a line. No data received. "
Any help would be very much appreciated
Private Const _server As String = "outlook.office365.com"
Private Const _user As String = "xxxxxx"
Private Const _password As String = "xxxxxxx"
ServicePointManager.SecurityProtocol = _
Using imap As New Imap
'Find all unseen messages.
Dim uids As List(Of Long) = imap.Search(Flag.Unseen)
lblOutput.Text = "Number of unseen messages is: " _
For Each uid As Long In uids
' Download and parse each message.
Dim email As IMail = New MailBuilder() _
' Display email data, save attachments:
Catch ex As Exception
lblOutput.Text = ex.ToString