MAPI
Overview
Section titled “Overview”The MAPI action hands a mail to a mail program installed on this PC. The mail goes out through the account set up there and lands in its Sent folder. You can display it before sending, send it directly or save it as a draft.
Client |
Meaning |
|---|---|
Default |
the Windows default mail program (default) |
Outlook |
classic Outlook, with all options on this page |
| a name | a specific mail program, e.g. Thunderbird, eM Client or Team (Tobit David), as registered in Windows – 64- or 32-bit |
In the diagram view of the workflow editor the action has a form. Send with lists the mail programs installed on this PC, with 32- or 64-bit; after installing one, the button next to it looks again. Under Other you type a name or a placeholder such as {{InitialData.MailProgram}}. What happens sets Mode: Open to check, Send directly or Save as draft (Outlook only). In the Mail section the Signature sits right below the text. Everything else is under More options; parameters the form does not know are kept under Other parameters as JSON.
Mode |
Effect |
|---|---|
Display |
The mail opens in the mail program. You check it and send it yourself. (default) |
Send |
The mail is sent without opening a window. Needs at least one recipient. See What “sent” means. |
Draft |
The mail is saved in the Drafts folder. Only with Client: Outlook. |
With Default or the name of another program RUNOS uses the Windows “Simple MAPI” interface. It knows only plain text and fewer options: RUNOS converts HTML to text and leaves out ReplyTo, Importance, DeliveryReceipt, OutlookSignature and From; every omitted option is a warning in the result (for OutlookSignature only the value Always). In the form these options are marked Outlook only.
| You have … | Use |
|---|---|
| credentials for an SMTP server | SMTP |
| classic Outlook and want to check mails before sending | MAPI with Client: Outlook and Mode: Display |
| Thunderbird, eM Client, Tobit David or another mail program | MAPI with Client: Default or the program’s name |
| Microsoft 365 / the new Outlook, or no mail program | Microsoft 365 |
32-bit mail programs
Section titled “32-bit mail programs”RUNOS is a 64-bit program. Some mail programs, such as Tobit David (Team), exist only as 32-bit programs; their MAPI interface cannot be loaded into RUNOS directly. For them RUNOS starts a small 32-bit mail helper, which hands the mail to the program and reports its answer back. There is nothing to set up: RUNOS detects when sending whether a program is 32- or 64-bit. This also applies to Default when the default mail program is a 32-bit program.
The helper is part of RUNOS and is unpacked to %LOCALAPPDATA%\RUNOS\MapiHost32\ the first time it is needed. Before each use RUNOS compares the file with its own copy; a changed file is replaced, never started. If security software or an AppLocker policy blocks programs in that folder, the action says so; allow RUNOS.MapiHost32.exe there. Mail programs installed only as ARM64 programs cannot be used by RUNOS.
Signature
Section titled “Signature”A mail gets one signature at most: the one from the Signatur field or the Outlook signature of the sending account, never both. The text from Body is always at the top, the signature below it.
With classic Outlook, OutlookSignature decides (in the form: Outlook signature under More options):
OutlookSignature |
Signatur empty |
Signatur filled in |
|---|---|---|
Auto (default) |
text, below it the Outlook signature | text, below it only Signatur; no Outlook signature |
Always |
text, below it the Outlook signature | text, below it the Outlook signature; Signatur is left out, with a warning |
Never |
only the text | text, below it Signatur |
If the account has no default signature for new messages in Outlook, the mail holds just the text. With the Outlook signature the mail is created as HTML, unless BodyFormat is Text.
With every other mail program (Default, Thunderbird, eM Client, Tobit David …) RUNOS only adds Signatur below the text. Whether the program adds a signature of its own is up to the program; RUNOS can neither read nor remove it. If you use Signatur, turn the signature off in the mail program so the mail does not get two.
Workflows from earlier versions keep running: true counts as Always, false as Never. Without the parameter, Auto applies. Until now a missing value meant no Outlook signature; check such workflows if the mail should stay without a signature, and set Never there.
What “sent” means
Section titled “What “sent” means”RUNOS reports Sent only when the mail program confirms that it took the mail. What happens next is up to the mail program: it sends right away, or keeps the mail in its outbox until it is online. If it refuses the mail or reports an error, the action fails and the mail does not count as sent.
- Classic Outlook: if Outlook was not running before, RUNOS waits up to
Timeoutseconds for the Outbox to empty; if the mail is still there, the result has a warning. - Other mail programs: some still show a window or ask before sending, even with
Send. If you close it without sending, theStatusisCancelled. Whether a program sends without asking is decided by the program, not by RUNOS; try it once with a test mail.
Structure
Section titled “Structure”{ "Type": "MAPI", "Name": "CreateMail", "Parameters": { "Client": "Outlook", "Mode": "Display", "To": "{{InitialData.Recipient}}", "Subject": "Your documents from %DATE%", "Body": "Hello,\n\nplease find the requested documents attached.", "Attachments": "C:\\RUNOS\\Out\\*.pdf", "MissingAttachments": "Error" }}| Parameter | Default | Meaning |
|---|---|---|
Client |
Default |
Default, Outlook or the name of a mail program, see above |
Mode |
Display |
Display, Send or Draft, see above. Any other value fails the action. |
Profile |
– | Outlook profile (Outlook only) |
From |
– | Outlook only: account or shared mailbox to send from |
To, Cc, Bcc |
– | Recipients separated by ; or ,. Name <a@b.com>, a list or the path of a file with addresses. |
ReplyTo |
– | Reply address (Outlook only) |
Subject |
– | Subject |
Body |
– | Text or path of a text or HTML file |
Signatur |
– | Text or path of a text or HTML file, placed below the text. With OutlookSignature: Auto it replaces the Outlook signature, see Signature. |
BodyFormat |
Auto |
Auto, Html or Text. Auto uses HTML when the text or signature contains HTML tags. |
OutlookSignature |
Auto |
Auto, Always or Never: when the sending account’s Outlook signature goes below the text (Outlook only), see Signature |
Attachments |
– | One path, several separated by ; or line breaks, a list or a pattern such as C:\Out\*.pdf |
MissingAttachments |
Error |
Error: a missing attachment makes the action fail. Skip: send without it, with a warning. |
Importance |
Normal |
Low, Normal, High (Outlook only) |
ReadReceipt |
false |
Request a read receipt |
DeliveryReceipt |
false |
Request a delivery receipt (Outlook only) |
Timeout |
60 |
Seconds RUNOS waits for Outlook to send if Outlook wasn’t running before |
All values may contain placeholders, yes/no values too ("true", "yes", "1"). The older parameters DisplayBeforeSend, HighImportance and IsHtml keep working.
Result
Section titled “Result”"Response": { "Results": [ { "Client": "Team", "Program": "Team", "Mode": "Send", "Status": "Sent", "To": "customer@example.com", "Cc": "", "Bcc": "", "Subject": "Your documents from 2026-10-08", "Attachments": [ "C:\\RUNOS\\Out\\offer.pdf" ], "Message": "Team confirmed the mail and sends it (it may wait in its outbox until it is online)." } ], "SuccessCount": 1, "ErrorCount": 0}Status is Sent (taken by the mail program), Displayed, Saved (draft), Cancelled (opened or asked, and closed without sending) or Error. Program is the mail program that took the mail (with Default, the default mail program; missing with Client: Outlook). Message describes the result, followed by all warnings.
Error messages
Section titled “Error messages”| Message | What to do |
|---|---|
Mode "…" is not valid. Use one of: Display, Send, Draft. |
Set Mode to one of these values; in the form under What happens. |
Mail program "…" is not installed for MAPI on this PC. Installed: … |
Use one of the names listed as Client, or install the program. |
No default mail program is set in Windows. |
Set a default mail program in Windows, or choose a program under Client. |
The MAPI component of … is missing or … or a file it needs is missing |
Repair or reinstall the mail program. |
… the 32-bit mail helper, which could not be started |
Allow RUNOS.MapiHost32.exe in %LOCALAPPDATA%\RUNOS\MapiHost32\ in the security software or AppLocker. |
…: logon to the mail program failed (is an account set up?) (MAPI error 3). The mail was not sent. |
Set up an account in the mail program or sign in. Other MAPI errors name their reason the same way. |
OutlookSignature "…" is not valid. Use one of: Auto, Always, Never. |
Set OutlookSignature to one of these values, in the form via Outlook signature. |
Mode "Draft" works only with Client "Outlook". |
Use Client: Outlook, or Display or Send. |
Example
Section titled “Example”Save every PDF from the folder C:\RUNOS\Offers as a draft in classic Outlook, from the shared mailbox sales@example.com. As Signatur is not set, the Outlook signature goes below the text:
{ "Name": "Offers as drafts", "Autostart": true, "Trigger": { "Type": "File", "Name": "Offers", "Parameters": { "Pool": "C:\\RUNOS\\Offers", "Filter": "*.pdf" } }, "Actions": [ { "Type": "MAPI", "Name": "Draft", "Parameters": { "Client": "Outlook", "Mode": "Draft", "From": "sales@example.com", "To": "{{InitialData.Customer}}", "Subject": "Your offer {{FileName}}", "Body": "C:\\RUNOS\\Templates\\offer.html", "Attachments": "{{FilePath}}", "Importance": "High" } } ]}The recipient comes from the PDF by script block: #RUNOS InitialData.Customer=customer@example.com #RUNOS.
