0
votes

I am looking for a way to automatically change an email address or be able to add a CC based on a condition. Is there an OfficeJS API call for outlook that lets me "edit" an email address or is able to add a CC based on a button click?

1

1 Answers

1
votes

In Compose Mode recipients can be accessed via Office.context.mailbox.item.to or cc. There are both getAsync() and setAsync() functions on those.

https://docs.microsoft.com/en-us/javascript/api/outlook/office.recipients?view=outlook-js-preview

You can also subscribe to the RecipientsChangeEvent to find out when a user has changed it.

https://docs.microsoft.com/en-us/javascript/api/outlook/office.recipientschangedeventargs?view=outlook-js-preview

Recipients can be accessed but not changed in Read Mode