Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: mailMessage.Size throw error IndexOutOfRa Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mchaudhary
Newbie
Newbie
Avatar

Joined: 25 June 2017
Location: India
Online Status: Offline
Posts: 1
Posted: 25 June 2017 at 11:23pm | IP Logged Quote mchaudhary

I need a urgent help regarding download mail from mailserver by MailBee.DLL.
While downloading email by MailBee.Pop3.DownloadEntireMessages Method(), Size property is throwing error "mailMessage.Size threw an exception of type 'System.IndexOutOfRangeException'"
but SizOnServer property is returning integer value correctly.
Using DLL version: MailBee.NET.45.DLL: 10.0.45.523
Back to Top View mchaudhary's Profile Search for other posts by mchaudhary
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Online
Posts: 6104
Posted: 26 June 2017 at 1:21am | IP Logged Quote Igor

Please check if the issue persists with the latest DLL build.

If the issue is still there, please enable POP3 logging, reproduce the issue and provide us with the logs for examination.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Harini
Newbie
Newbie


Joined: 28 September 2021
Online Status: Offline
Posts: 1
Posted: 28 September 2021 at 9:28pm | IP Logged Quote Harini

Still facing the same issue in mailbee dll version 12.2.0630. In mailMessage.Parser.Apply(), Size property is throwing error "Value was either too large or too small for an Int32." The issue is fixed with latest 12.2.2.646. However, the customers are in 12.2.0630. Is there any possible workaround instead of having to replace the DLL for the customer's instance.
Back to Top View Harini's Profile Search for other posts by Harini
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Online
Posts: 6104
Posted: 29 September 2021 at 2:47am | IP Logged Quote Igor

Hello,

The response from the developers on this is as follows:

This issue is caused by an incorrect HTML char codes. For instance, something like this exists in the HTML source:



43310450277903 cannot be converted into int because of overflow.

If you can filter out such incorrect entries before converting HTML into plain-text using MailBee, this error will go away.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
WLF2022916
Newbie
Newbie
Avatar

Joined: 05 November 2023
Location: United Kingdom
Online Status: Offline
Posts: 10
Posted: 05 November 2023 at 11:35am | IP Logged Quote WLF2022916

Hello
Reading forum topics is always a good idea, sorry for jumping in a thread which does not belong to me.

Emails specially rfc822 eml can be very non-standard, strange invalid characters inside etc...
When writing an app which downloads emails from a remote server, at first place we have no idea about their contents.
If we need to filter out incorrect entries from emails which may cause similar exceptions in different functions/properties:

1. Do you have any plan to add an optional internal method to filter out invalid characters from email on demand?
2. If not, can you please share a sample code for the above task? Many people are not familiar with the underlying structure of emails and so I have no idea where to start, how to do and filter out what in which condition?

The above shared piece which is: �
Does not have special non-printable characters etc so no idea what's wrong with it, because of that, adding a code sample and insert into the help files for this scenario is not a bad idea.
Back to Top View WLF2022916's Profile Search for other posts by WLF2022916
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 06 November 2023 at 2:02am | IP Logged Quote Alex

Hi,

MailBee does not know if each particular char in the message is printable or not. So it cannot filter anything out.

You have to do that with your own logic (although I have no idea what it could be, at least I haven't seen other mail clients would do that). You have access to all the properties (body, headers, etc) so once you loaded the message and MailBee parsed it for you, you can apply this logic when reading each particular property.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide