we are using c# to send outlook mail activity.
but we are getting one pop up please select level public or confidential every time.
I tried to add below code but still not working.
OutlookNM.MailItem oMsg = (OutlookNM.MailItem)oApp.CreateItem(OutlookNM.OlItemType.olMailItem)
oMsg.Sensitivity = OutlookNM.OlSensitivity.olNormal
after adding the above line still I am getting same level popup.
raj rajPosted Dec 6, 2022, 5:00 AM
Hi Jignesh,
I added code.
raj rajPosted Dec 6, 2022, 4:13 AM
using OutlookNM = Microsoft.Office.Interop.Outlook;
OutlookNM.Application oApp = new OutlookNM.Application();
if (!string.IsNullOrEmpty(outlookSendMailModel.OutlookProfileName))
{
OutlookNM.NameSpace ns;
ns = oApp.GetNamespace("MAPI");
ns.Logon(outlookSendMailModel.OutlookProfileName);
}
OutlookNM.MailItem oMsg = (OutlookNM.MailItem)oApp.CreateItem(OutlookNM.OlItemType.olMailItem);
oMsg.Subject = outlookSendMailModel.Subject;
oMsg.Sensitivity = OutlookNM.OlSensitivity.olConfidential;
oMsg.Send();
Jignesh KumarPosted Dec 5, 2022, 1:01 PM
Hello Raj,
Can you add sample code snippet for that ?
raj rajPosted Dec 5, 2022, 11:50 AM
this is console application how can we add header
Jignesh KumarPosted Dec 5, 2022, 10:15 AM
Hi Raj,
just try to add this one in you mail sending event,