When I send a mail with the option "Encrypt only" in Outlook
I receive a mail like this :
Currently, I use SMTPClient with MailMessage to send mail :
MailMessage message = new MailMessage();
message.From = from;
MailAddress to = new MailAddress(destString);
message.To.Add(to);
message.Subject = subject;
smtpClient.Send(message);
How can I modify my code to send a mail and receive it as the mail above ?
After some researching, I found a solution by using Interop but I can't use it in my project.
var app = new Microsoft.Office.Interop.Outlook.Application();
var item = (Microsoft.Office.Interop.Outlook.MailItem)app.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
item.To = [email protected];
item.Subject = "test";
item.Permission = Microsoft.Office.Interop.Outlook.OlPermission.olDoNotForward;
item.PermissionService = Microsoft.Office.Interop.Outlook.OlPermissionService.olWindows;
item.Send();