User61956409 posted
Hi fytan88,
Welcome to ASP.NET forums.
How to make changes in the outlook file save as type in the save file dialog box using C#?
Firstly, as PatriceSc suggested, please clarify more about your requirements and problems, so that we can understand it better.
Besides, if you'd like to find and use .NET libraries to read and write MSG file, you can search about it using your favourite search engine to find some .NET libraries for reading/writing MSG file(s),
I'm using following libraries:
https://github.com/Sicos1977/msgreader
Example code:
using (var msg = new MsgReader.Outlook.Storage.Message(@"C:\test.msg"))
{
var from = msg.Sender;
var sentOn = msg.SentOn;
var recipientsTo = msg.GetEmailRecipients(MsgReader.Outlook.RecipientType.To, false, false);
var recipientsCc = msg.GetEmailRecipients(MsgReader.Outlook.RecipientType.Cc, false, false);
var subject = msg.Subject;
var htmlBody = msg.BodyHtml;
// etc...
}
https://github.com/Sicos1977/MsgKit
Example code:
using (var email = new Email(new Sender("xxxx@xxx.com", "xxxx"),
new Representing("xxxxx@xxx.com", "xxxxx"),
"This is the subject"))
{
email.Subject = "This is the subject";
email.BodyText = "this is text";
email.BodyHtml = "<html><head></head><body><b>Hello World</b></body></html>";
email.Save(@"C:\test1.msg");
}
With Regards,
Fei Han