Sicos1977 / MSGReader

C# Outlook MSG file reader without the need for Outlook
http://sicos1977.github.io/MSGReader
MIT License
489 stars 168 forks source link

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. #370

Closed brenopgarcia closed 1 year ago

brenopgarcia commented 1 year ago

Hello,

I tried to use the method GetEmailRecipients and I got an exception. The email file has more than 40 people emailing the recipient "To". image image

Is it possible to change the range via a parameter?

Thank you.

Sicos1977 commented 1 year ago

No that is not possible. Please sent me the MSG file so that I can investigate what is going wrong.

Please ZIP te file before sending it to sicos2002@hotmail.com

brenopgarcia commented 1 year ago

Unfortunately, I can't send the email file, it is private.

By the way, thank you for answering.

On Fri, Sep 29, 2023 at 2:05 PM Kees @.***> wrote:

No that is not possible. Please sent me the MSG file so that I can investigate what is going wrong.

Please ZIP te file before sending it to @.***

— Reply to this email directly, view it on GitHub https://github.com/Sicos1977/MSGReader/issues/370#issuecomment-1740781984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXEUZEM33HGZL4OUDIID4DX422PTANCNFSM6AAAAAA5MLDCVQ . You are receiving this because you authored the thread.Message ID: @.***>

Sicos1977 commented 1 year ago

The error indicates that something is going wrong when decoding the recipient row from the MSG file. But if you can't sent me the file I can't check what is going wrong. You could try to debug it yourself and sent me a pull request if you can get it fixed. Without an MSG file I can't fix it because I don't know what is going wrong.

Sicos1977 commented 1 year ago

My first guess would be by adding a breakpoint over here and see what is happening --> https://github.com/Sicos1977/MSGReader/blob/7ff37b3643b237c2a08d8826bf91f4ec645cb036/MsgReaderCore/Outlook/UnsendableRecipients.cs#L489

brenopgarcia commented 1 year ago

Sorry,

On line 534 where it has a switch statement for type, it receives the type 4095, then throws an exception on line 665.

[image: image.png]

I am not sure about this issue, but this .msg file has required and optional recipients.

[image: image.png]

Does it could be the reason?!

BR

Breno Garcia

On Fri, Sep 29, 2023 at 2:41 PM Kees @.***> wrote:

My first guess would be by adding a breakpoint overhere and see what is happening --> https://github.com/Sicos1977/MSGReader/blob/7ff37b3643b237c2a08d8826bf91f4ec645cb036/MsgReaderCore/Outlook/UnsendableRecipients.cs#L489

— Reply to this email directly, view it on GitHub https://github.com/Sicos1977/MSGReader/issues/370#issuecomment-1740836660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXEUZGVXBPRPSX75CQ4FJTX426YLANCNFSM6AAAAAA5MLDCVQ . You are receiving this because you authored the thread.Message ID: @.***>

brenopgarcia commented 1 year ago

Actually, it has a lot of types that are not on the Enumerable PropertyType.

On Sun, Oct 1, 2023 at 11:23 AM Breno Garcia @.***> wrote:

Sorry,

On line 534 where it has a switch statement for type, it receives the type 4095, then throws an exception on line 665.

[image: image.png]

I am not sure about this issue, but this .msg file has required and optional recipients.

[image: image.png]

Does it could be the reason?!

BR

Breno Garcia

On Fri, Sep 29, 2023 at 2:41 PM Kees @.***> wrote:

My first guess would be by adding a breakpoint overhere and see what is happening --> https://github.com/Sicos1977/MSGReader/blob/7ff37b3643b237c2a08d8826bf91f4ec645cb036/MsgReaderCore/Outlook/UnsendableRecipients.cs#L489

— Reply to this email directly, view it on GitHub https://github.com/Sicos1977/MSGReader/issues/370#issuecomment-1740836660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXEUZGVXBPRPSX75CQ4FJTX426YLANCNFSM6AAAAAA5MLDCVQ . You are receiving this because you authored the thread.Message ID: @.***>