I have seen code that allows to change the account through which an email is being sent for an outlook user that has multiple accounts.
I have also seen code that allows to send on behalf of another email address (for which you have permissions to send as).
I have been trying to write code to change the sender to one of the defined aliases for that user, and I cant get it to work. The reason is that it is not enough to specidy on the mailItem the sendOnBehalfOf, but as I figured out through troubleshooting, the mailItem.Sender needs to be set to an AddressEntry object with aOlAddressEntryUserType set to olSmtpAddressEntry and with the alias smtp addresses set. I did search the GAL for existing AddressEntries but none of them had the aliases, so I am assuming it need to be created but I was unsuccessful creating one. Does anyone have experience with how to do this?
I have also seen code that allows to send on behalf of another email address (for which you have permissions to send as).
I have been trying to write code to change the sender to one of the defined aliases for that user, and I cant get it to work. The reason is that it is not enough to specidy on the mailItem the sendOnBehalfOf, but as I figured out through troubleshooting, the mailItem.Sender needs to be set to an AddressEntry object with aOlAddressEntryUserType set to olSmtpAddressEntry and with the alias smtp addresses set. I did search the GAL for existing AddressEntries but none of them had the aliases, so I am assuming it need to be created but I was unsuccessful creating one. Does anyone have experience with how to do this?