question

POMANSandeep-8361 avatar image
0 Votes"
POMANSandeep-8361 asked

Office js outlook, how to check if email is incoming or outgoing

I am creating a outlook plugin with taskpane. I am using office js to access the email.

I want to know if current email is incoming or outgoing in the plugin. Is there a way in office js that can help me with this?

I tried checking all the properties but could not find anything obvious.

Thanks!!

I am using a outlook plugin and opening a taskpane.
I need to add different behaviour to taskpane depending on if the current email for which the taskpane is opened belongs to inbox or sent items.

const [messageType, setMessageType] = useState( Office.context.mailbox.officeAppContext._docUrl.indexOf('sentitems') > -1 ? 'Outgoing' : 'Incoming' );

I tried using this but this only works in web but does not work in native outlook client.

office-js-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers