Hi,
I tried to send a meeting request from the mail box address (mail box address should come in from field) which is configured in my outlook using outlook interop.
If i use session. Account , it is giving only my default mail and it is not bringing my mailbox account ID. Please help.
What I have tried:
Code sample below
Microsoft.Office.Interop.Outlook.Application olkApp1 = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MailItem olkMail1 = (Microsoft.Office.Interop.Outlook.MailItem)olkApp1.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
Outlook.Accounts accounts = olkApp1.Session.Accounts;
foreach (Outlook.Account account in accounts)
{
if (account.DeliveryStore.DisplayName == "XYZ@abc.com") // This is theSMTP addressof my mailbox
{
olkMail1.SendUsingAccount = account;
//((Outlook._AppointmentItem)appt).Send();
MessageBox.Show(account.SmtpAddress);
break;
}
}
How to send Meeting request by using additional mailbox address?