You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is the vb.net code I am using. the OnNew Message fires for the same message over an over again (randomly 5 -15 mins gap). Is there something wrong in my code?
VB .NET:
Form Load:
If mClient.Supports("IDLE") Then
AddHandler mClient.NewMessage, AddressOf mcOnNewMessage
End If
Public Sub mcOnNewMessage(ByVal sender As Object, ByVal e As IdleMessageEventArgs)
OnNewMessage(sender, e)
End Sub
Private Delegate Sub dOnNewMessage(ByVal sender As Object, ByVal e As IdleMessageEventArgs)
Public Sub OnNewMessage(ByVal sender As Object, ByVal e As IdleMessageEventArgs)
If Me.InvokeRequired Then
Me.Invoke(New dOnNewMessage(AddressOf OnNewMessage), sender, e)
Exit Sub
End If
Try
Dim m As MailMessage = sender.GetMessage(e.MessageUID)
Log("New Mail From : " & m.From.Address.ToString & "Subject: " & m.Subject.ToString)
Catch ex As Exception
Log(ex.Message)
End Try
End Sub
The text was updated successfully, but these errors were encountered:
Some servers seem to send an additional EXISTS notification after each EXPUNGE notification. Not sure why they would do that, but I guess this is the problem.
I have pushed a new version that addresses this issue. Please try and see if it solves your problem.
Below is the vb.net code I am using. the OnNew Message fires for the same message over an over again (randomly 5 -15 mins gap). Is there something wrong in my code?
VB .NET:
Form Load:
If mClient.Supports("IDLE") Then
AddHandler mClient.NewMessage, AddressOf mcOnNewMessage
End If
The text was updated successfully, but these errors were encountered: