Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
JoseOH2  
#1 Posted : Tuesday, December 21, 2021 3:12:11 PM(UTC)
JoseOH2

Rank: Newbie

Groups: Registered
Joined: 12/21/2021(UTC)
Posts: 2
Mexico
Location: CDMX

Thanks: 1 times
I'm required to use .MSG extension as my organization's previous developments are not compatible with .EML files.

I've been trying to save mails by using SaveAsOMSG method, however I can't get past the following error message:

"No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method."

Does anybody know how to achieve it?

Thanks in advance.
ivan  
#2 Posted : Thursday, December 23, 2021 3:33:52 AM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,153

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
It seems that you're using .NET Core:
You need to install the package from nuget,
Install-Package System.Text.Encoding.CodePages -Version 5.0.0

Then add the following code before you parse the email.

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
thanks 1 user thanked ivan for this useful post.
JoseOH2 on 12/27/2021(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.049 seconds.

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.