Google for SmartReply add-in for Outlook.
Outlook shared mailbox - get sending account from email
Hi All,
I have an Outlook profile with several email accounts and two shared mailboxes. Each shared mailbox I can manually send an email and it will use the proper account to send the email (designated accounts below)l. Obviously, the email account used is set up in the exchange settings. For example, here is a setup.:
inbox folders --- email --- Sent using outlook account
tom -- - tom@keyman .com -- tom@keyman .com
another --- another@keyman .com --- nother@keyman .com
onemore -- - onemore@keyman .com --- onemore@keyman .com
SharedOne --- sharedone@keyman .com --- tom@keyman .com
SharedTwo --- sharedtwo@keyman .com --- another@keyman .com
I have a custom compose (message) replace-all form region in which I provide a "from" address list that contains all of the email addresses listed above. So if the user selects an email address, I want to be able to set the mail item sending account (SendUsingAccount).
The main issue is that the shared email addresses are not included in the profile account collection.
So my question is, how can I get the sending account from the shared email address? My problem is if I switch the "from" email, I want to be able to set the proper account. So given an email, using the Outlook object model, how can I get the account so that I can set the SendUsingAccount in the MailItem?
I have exhausted many different attempts by trying to match store IDs to folders and store ID to emails or accounts. It seems like I need to get the default account for a shared mailbox, and I have not been able to figure out how.
Thanks,
Tom
2 answers
Sort by: Most helpful
-
-
Doug Robbins - MVP 716 Reputation points
2021-01-06T10:10:19.6+00:00 In Outlook, go to File>Options>Mail>Send Messages and check the box for “Always use the default account when composing new messages”
When that box is checked, the account that you set as the Default Account under File>Account Settings>Account Settings is the account from which the Merge Tools utilities will send the messages.