[E2010] [EWSMA] [C#] [Windows]: How do I Send An email on Behalf of other accounts using EWS within an OutlookAddin RRS feed

  • Question

  • Main Question: How can I use EWS from an outlook Addin to send emails on behalf of another mailbox. I am sending emails (creating and replying) from a centralized account but I want it to look like its coming from one of the many clients accounts that we have. Which account credentilas do I use in creating the Exchange object

    Additional Info: So far I have been able to connect to EWS within the Addin (witha domain user account) but connecting to the client mail boxes and sending on behalf of has proven a challenge For each client, Exchange team (ET) created disabled mail user object without an account to log on, currently about 101 of them. Then ET also created a single centralized mail box with the aim of managing the emails for the multiple client mail boxes (each with its own unique emailaddress) as folders from a single centralized mail box using forwarding (from the client mail boxes upon arrival of the mail) and rules to route the mails to the specific folders within the main box.

    Insight, thoughts much appreciated

    Tuesday, November 19, 2013 7:47 AM

All replies

  • Hello Alwaxman,

    welcome to the Technet Forums. Using delegation you theoretically could send as another user, without needing to resort to a Plugin. If that does not meet your requirements, EWS contains the ability to use impersonation (a property on the Exchange Service Object) to have the user pretend to be another user, granting the ability to do everything the other user could have done.


    This requires the ApplicationImpersonation Exchange-Privileges for the user who does use this functionality. And it's a not-restrictable privilege, which means it would work for all mailboxes in the Organisation. So if you wanted to make sure to prevent abuse, you'd have to restrict access to other accounts by other means in your Plugin and pray the user does not abuse it (or have your bosses pray you don't abuse it ;) ), because if s/he can create his/her own EWS application without restrictions s/he can wreak havoc.


    There's no place like

    Tuesday, November 19, 2013 8:04 AM