Skip to main content

Exchange (EWS)

20 commands. Toolkit id ooa.exchange.

CommandWhat it does
Connect to Exchange mailboxSign in to an on-premises Exchange Server mailbox through Exchange Web Services (EWS) as a named session; checks the sign-in by opening the inbox. For Exchange Online (Microsoft 365) use the Microsoft 365 toolkit instead: Microsoft is retiring EWS there.
Delete all emailsDelete every email of a folder that the filters find (G5).
Delete emailDelete an email: moved to Deleted Items, or with permanent removed from the folders (Exchange still keeps it in Recoverable Items for its retention time).
DisconnectClose the Exchange mailbox session.
Each email in an Exchange folderYield each email matching the Find emails filters as a dictionary: id, from, subject, received, unread, has_attachments.
Exchange folder existsTrue when the mailbox has the folder, e.g. Inbox/Invoices (G5).
Find emailsList emails in an Exchange folder, newest first, filtered by unread, sender, subject and date; loop over the table to process them.
Forward emailForward an email, with its attachments, and a note shown above the original.
Get foldersList all mail folders of the mailbox as paths such as Inbox/Invoices.
Mark read or unreadMark an email as read or unread, and optionally set or clear its follow-up flag.
Move all emailsMove every email of a folder that the filters find to another folder (G5).
Move emailMove an email to another folder, e.g. Inbox/Processed; returns its new id, as Exchange gives a moved email a new one.
Read emailRead one email: sender, recipients, subject, text, HTML and attachment names.
Reply to allReply to the sender and all other recipients of an email, keeping it in the same conversation with the original quoted below.
Reply to emailReply to the sender of an email, keeping it in the same conversation with the original quoted below.
Save all attachmentsSave the attachments of every email of a folder that the filters find (G5).
Save attachmentsSave an email's file attachments to a folder, optionally only names matching a pattern such as *.pdf.
Save email as .emlSave a whole email (text, HTML, attachments and headers) as an .eml file that any mail program opens.
Send emailSend an email (plain text or HTML) with optional CC, BCC and attachments from the Exchange mailbox, keeping a copy in Sent Items.
Test Exchange connectionCheck an Exchange address and sign-in without keeping a session: ok and what went wrong (G5).