Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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?
Posted
Updated 21-Jun-16 23:17pm
v2
Comments
RedDk 22-Jun-16 13:05pm    
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.application.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1

The word "Mail" appears 17 times on this page.

Also note that more tags might be applied to this post by "Improve Question"; Visual Studio version perhaps, Outlook version, other.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900