Outlook shared mailbox - get sending account from email

gigasoft 21 Reputation points
2020-12-29T20:57:13.093+00:00

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

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,006 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Victor Ivanidze 101 Reputation points
    2021-01-06T10:08:17.797+00:00

    Google for SmartReply add-in for Outlook.

    0 comments No comments

  2. 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.