Hi ,
I am working on a project which reads emails using pop3 protocol, but while reading some emails from mailserver, it is showing below error ::
"Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application"
when I debugg code , it is not able to retrieve that particular emails , and stops reading of next emails of Inbox. To read next emails of that mailserver e.g pop.gmail.com, we need to manually delete or read that email.
The below command is not able to retrieve such email, I dont know specific criteria to reproduce issue, because it reproduces very rarely.
'''
''' Send RETR command to POP 3 server to fetch one particular message
'''
''' <param name="MessageNo" />ID of message required
''' <returns>false: negative server respond, message not delivered
Protected Function SendRetrCommand(ByVal messageNo As Integer) As Boolean
EnsureState(Pop3ConnectionStateEnum.Connected)
' retrieve mail with message number
Dim response As String
If Not executeCommand("RETR " & messageNo.ToString(), response) Then
CallWarning("GetRawEmail", response, "negative response for email (ID: {0}) request", messageNo)
Return False
End If
Return True
End Function
The above function of vb.net is not able to retrieve such mails.
Could you please help me on this?
Thanks in advance,
Santosh