FetchMessage problem

I'm running into an issue where when I call the FetchMessage() method on my Pop3Client instance, FetchMessage() never returns and my CPU is pegged at 100%. I'm using the latest version of Aspose.Network. The code I am using has worked for most messages but there seems to be an issue with this and a few other messages.

I have a feeling it is something wrong with the message parsing.

I have gone to the trouble of calling SaveMessage() instead and the email is saved perfectly fine and is able to be opened via Outlook Express. I have a copy of the message saved if this will help you determine the problem. I cannot post the message in a public forum, however. Thank you.

Could you please check this hotfix? We have fixed a bug relative to the parsing.

https://downloads.aspose.com/email/net

In addition, FetchMessage will do parsing when receive the message. While the SaveMessage only downloads the remote messages to local.

Thanks,

Yes, this seems to have fixed the problem for this message. I will post back if there are problems with other messages. Thank you for your help.

Hi,


I’m having this same problem with aspose.network 4.8.0.5. using .NET Framework 2.0 and the ImapClient. It is hanging for both the FetchMessage and SaveMessage methods…

below is my code that i’ve created to just test it out. It hangs on the SaveMessage() i do not get an exception and the method never returns …

Private Function GetSslClient() As ImapClient

'connect to email server
Dim vServer As String = “server.name”
Dim vPort As Integer = 143
Dim vUsername As String = “account”
Dim vPassword As String = “Password1”

'create the client SSL stuff is commented out.
Dim vClient As New ImapClient(vServer, vUsername, vPassword)

Return vClient
End Function

Sub Main()
Try
'create the client
Dim vClient As ImapClient = GetSslClient()
vClient.Connect()
vClient.Login(Aspose.Network.Imap.ImapAuthentication.PlainTextAuthentication)
vClient.SelectFolder(ImapFolderInfo.InBox) 'grab the inbox
Dim vMessageList As ImapMessageInfoCollection = vClient.ListMessages()
If vMessageList.Count > 0 Then
Dim vPath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), “EmailMessage.eml”)
vClient.SaveMessage(1, vPath)
Dim vMailMessage As MailMessage = MailMessage.Load(vPath)
Dim c As String = vMailMessage.Body.ToString()
End If
vClient.Disconnect()

Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub

Hi,

What email server are you using? Can you provide me the mail account for debugging?

Thanks,

hi,

actually I’m using exchange server 2007. It is for a customer that I’m working with so i don’t have much control over the configuration. I would like to use the exchangeClient but it does not seem to support SSL and I’m restricted to SSL with their current exchange setup.

I need to get attachments from the mailbox that is being monitored. Is there possibly an alternative for me to use?

regards,
Trev


doing some more testing today this code works absolutely fine with my gmail account (though i added SSL to work with gmail).

Unfortunately the exchange server is only facing internal (dev environment) so you cant access it, is there some tests that i could possibly do for you?

Hi,

Thanks for considering Aspose.

Could you please try using ExchangeWebServiceClient class to connect to Exchange Server 2007. For more information, please visit https://docs.aspose.com/email/net/working-with-exchange-mailbox-and-messages/.

Hi,


Thanks for your response, unfortunately the ExchangeWebServiceClient is presenting another problem. When i run the code below i get a WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The server-guys here tell me that the server is using a self-signed certificate, could this cause any problems? I’ve tried connecting with both the webServiceaddress (as the uri below) and the mailbox directly, https://server/owa/user@domain.com and both have the same issue.

Sub Main()
Try
Dim userName As String = “user”
Dim passwd As String = “Password1”
Dim domain As String = “Domain”
Dim uri As String = “https://servername/ews/exchange.asmx

Dim client As New ExchangeWebServiceClient(uri, userName, passwd, domain)
Console.WriteLine(client.MailboxInfo().InboxUri())
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub

Hi,

Please try the attached dll. We fixed the ImapClient issues.

Thanks

Hi,


I’m sorry. The problem still exists for me with the ImapClient with both SaveMessage() and FetchMessage(). The server is not setup to accept SSL over IMAP at the moment, but this could be something more to test.

I’m using the code from this thread <a href="https://forum.aspose.com/t/44435

Could it be some settings on the exchange server that i could play with?

I could not open the link in iret’s post on ‘07-31-2007, 4:42 AM’

But it might be an older version than what I am using (4.8.0.12)

I am also meeting this problem now, my code stuck at FetchMessage()

try
{
    pop3Client.FetchMessage(sequqnce_number);
}
catch(Exception ex)
{
    //...
}

It even does not go to catch block

Hi,

The link points to v3.5 and it does not exist now on our server, as we only host 1 year older releases now.

Are you using a 65-bit OS? I remember we fixed some hang and parsing issues related to 64-bit OS.