Free Support Forum -

Wrong encoding for the subject field in Mail to Eml conversion


I try to convert Thunderbirds Mail into Eml format and i have some trouble with the “subject” field.

When i read the subject in the MailMessage object all is perfect :
Subject: [cgm-insb] Cafetière(Aspose.Email Evaluation)

But when i save the eml conversion of this mail the subject become unreadable :

I save the eml with this line :
message.Save(“C:/test/”+nbMail+".eml", MailMessageSaveType.EmlFormat);

Is there any solution or workaround for this problem?

Thanks for your help!

Ok i have resolve my problem, there is a specific encoding parameter for the subject.

message.SubjectEncoding = new UTF8Encoding();

And all goes fine!

Hi Nicolas,

It’s good to know that your issue is resolved now. If you have any additional query/inquiry, please feel free to contact us. We will be glad to help you.