Modifying .MSG Files

I need to take existing .MSG files and add additional recipients in the BCC field and then save them back as .MSG files. I noticed that when I load .MSG files with MapiMessage class all the properties are read only. Is there a way around this or a limitation.


This message was posted using Page2Forum from Accessing Outlook MAPI Property - Aspose.Network for .NET

Hi,

Thank you for inquiry.

MapiMessage class cannot modify the message contents at the moment. You may use MailMessage class to load the MSG and modify its contents including the BCC.


MailMessage message = MailMessage.Load(“Test.msg”, MessageFormat.Msg);
message.Bcc.Add("address1@domain.com");
Console.WriteLine(“Saving as MSG…”);
message.Save(“test-out.msg”, MailMessageSaveType.OutlookMessageFormat);