We are using Aspose.Networks 3.5.3 and have noticed, that an old problem is back. The enclosed eml was stored by Aspose.Network.Exchange.ExchangeClient and cannot be loaded by Aspose.Networks anymore.
Thanks for the info.
We are now checking the root. I will get back to you soon.
I just want to add, that this is a very critical bug for us, because this error happened in the production system. We hope, you can provide a solution as soon as possible.
We have located the root, and fixed it. Please check it out. The root is some header containing unexpected chars, not the previouse bug.
Please let me know if it works.
The original problem is solved but now retrieving mails does not work anymore. Using Aspose.Network.Exchange.ExchangeClient.ListMessages results in this exception:
Header ends prematurely while character ‘>’ was expected at position 30.
bei Aspose.Network.Mime.x48f5bcaa993d2e2c.xa227c01e5e59cdc4(Char x3362caa77b1
We cannot determine, which mail causes this error, because there are some thousands of mails in the mailbox. These thousands of mails are generate from exchange servers, so these mails are real world mails. Again, we need a solution asap.
It looks like the Exchang server giving some kind of messages contain invalid charactors. I am working on this issue and try to get back to you shortly.
Could you please try this hotfix? I have added some debug information and extracted more info about the infomations. Please run it and get the exception to me. Print out the exception you catched by
using Exception.ToString() function, we will get all info we need to debug.
bei Aspose.Network.Mail.MailAddress.x1f490eac106aee12(x48f5bcaa993d2e2c xe134
235b3526fa75, x9562fab6cd9b077f& x179bb663e71b1f59, x067709715f06eb57& xf0d47d76
98b4e263, Boolean& xe2c9497bf778cd2b)
bei Aspose.Network.Mail.MailAddressCollection.op_Implicit(String addresses)
50d157 xe464d907306ccb86, ExchangeMessageInfo& x02f8da7b6171e2e6)
bei Aspose.Network.Exchange.ExchangeClient.ListMessages(String folder, Boolea
bei Aspose.Network.Exchange.ExchangeClient.ListMessages(String folder)
Hope this helps.
Please post the content of the exception here, instead of the call stack.
You can catch the exception and get its .ToString function return. I added some debug message in to the content of the exception.
But the ToString function returns the call stack.
I´ve investigated the exception with the debugger: it´s a Aspose.Network.Mime.MimeException with NO message and NO inner exception (both are null). (So beside the problem retrieving the messages the exception is not very helpful). But we have found a message in the not public members: “Header parse failed:“A1 Team” <A1-Team@mob.cc”. Here we can see, that there is a missing ‘>’.
Please check, if Aspose.Networks deletes this character. I don´t think so, but we have to assure. If not, the original mail on the exchange server has this (apparently erroneous) mime header, but Aspose.Networks SHOULD NOT throw an exception because of this. Because it´s a valid email and the email could be a bounce email (with erroneous content).
Thanks for your info.
Could you add an Try-Catch in the code, and save that EML to me? I could like to investigate about the issue, before doing to much fixing works.
Well, we can be sure to add some fail-over handling in the email parsing. Therefore, it will not throw out exceptions.
As mentioned above Aspose.Network.Exchange.ExchangeClient.ListMessages throws this exception. How can I save a message, if ListMessages does not return messages, because it cannot parse MimeHeaders? But I will try to develop a application to extract the erroneous email.
Beside this problem, I have attached an eml, which cannot be loaded by Aspose. Is it really ok that Aspose throws an exceception while loading this email?
Here are two emls.
error_534.eml: here the header is not entire correct (see “A1 Team” <A1-Team@mobilkom.at)
error_1428.eml: some loading error.
Hope this helps.
Are there news about this?
We have released a new version of Aspose.Network. The empty attachment bug you mentioned has been fixed. Please check it out.