Trigger a fully pre-filled email composer from any application with a single command-line call. Hand BoMail PRO a plain-text control file — recipients, subject, attachments and body — and let your user review and send. A simple, practical way to send mail from your software without building an email client of your own.
A practical integration for POS, ERP and any line-of-business application.
Many applications need to send the occasional email — an invoice, a delivery note, a quote — but writing and maintaining a full mail engine (SMTP, encoding, attachments, HTML bodies) is a lot of work for a side feature. The BoMail PRO Developer API removes that burden: your application writes a small control file and launches bomail.exe with the file path as its only argument.
BoMail reads the file, opens a new email in its composer with everything pre-filled, deletes the control file, and waits. The user reviews the message, edits if needed, and clicks Send. Nothing is transmitted automatically — the human stays in control of every outgoing mail.
Your application never touches SMTP, encoding or MIME. It just writes a text file — BoMail handles composing and sending.
Unlike a plain mailto: link, the control file can attach one or more files — something mailto: simply cannot do.
No network call, no service, no port. A file on disk and one process launch — that is the whole interface.
Free for every developer. Using and integrating the BoMail PRO Developer API costs nothing — there are no licence fees and no recurring costs for the integration itself. The only requirement is that the end user runs a BoMail PRO licence on their machine.
Create a UTF-8 text file (e.g. bm.dat) with the directives described below.
Pass the absolute path of the control file as the single argument.
BoMail fills recipients, subject, attachments and body, deletes the control file, and shows the composer. The user clicks Send.
"C:\Program Files\BoMail\bomail.exe" C:\temp\bm.dat
No leading slash before the drive letter. A path like /C:/temp/bm.dat is
not a valid Windows path — the file will not be found and nothing happens. Use
C:\temp\bm.dat or C:/temp/bm.dat. Forward and back slashes inside the
path are both fine; only the leading slash must be omitted.
One directive per line, in the form KEY: value. Keys are case-insensitive.
FROM: info@bomail.at
TO: sales@bomail.at
TO: support@bomail.at
CC: xyz@bomail.at
BCC: archive@bomail.at
SUBJECT: Order 4711 is ready for shipping
ATT: C:\temp\invoice.pdf
ATT: C:\temp\delivery-note.pdf
BODYFORMAT: html
BODY: <p>Dear customer,</p><p>your order <b>4711</b> is ready.</p>
TO, CC, BCC and ATT may appear multiple times — one recipient or one file per line.
Write the file as UTF-8 (with or without BOM). Other encodings will garble umlauts and special characters.
BODY goes lastBODY must be the final directive. Everything after it — including multi-line HTML — is treated as the message body.
| Directive | Cardinality | Description |
|---|---|---|
| FROM | Optional | Sender address. If it matches a mailbox configured in BoMail, that mailbox is selected. If omitted or not configured, the default mailbox is used. |
| TO | Repeatable | A recipient address. Repeat the line for multiple recipients. |
| CC | Repeatable | A carbon-copy recipient. Repeat per address. |
| BCC | Repeatable | A blind-carbon-copy recipient. Repeat per address. |
| SUBJECT | Optional | The subject line. Single line, no line breaks. |
| ATT | Repeatable | Absolute path to a file to attach. Repeat per file. Missing files are skipped and listed in a warning. |
| BODYFORMAT | Optional | Either html or text. Explicitly overrides the automatic body detection (see below). |
| BODY | Optional | The message body, HTML or plain text. Must be the last directive — all following lines belong to the body. |
At least one of TO, CC, BCC, SUBJECT or BODY
must be present. If none are, the file is ignored — this guards against arbitrary .dat
files being interpreted as mail.
If BODYFORMAT is omitted, BoMail inspects the body: if it starts with < it is treated as HTML, otherwise as plain text (line breaks become <br>).
Set BODYFORMAT: html or BODYFORMAT: text to remove all ambiguity — useful when plain text happens to begin with <.
The BoMail signature assigned to the sender mailbox is added below the supplied body. With no body, only the signature appears.
Tip: if your application already knows whether it produces HTML or plain text, always
write BODYFORMAT explicitly. The result is then deterministic and never depends on the
detection heuristic.
Pick your language — write the file, then launch BoMail.
' Write control file as UTF-8, then launch BoMail
Dim pfad As String = "C:\temp\bm.dat"
Dim sb As New System.Text.StringBuilder()
sb.AppendLine("TO: kunde@bomail.at")
sb.AppendLine("SUBJECT: Invoice 4711")
sb.AppendLine("ATT: C:\temp\invoice.pdf")
sb.AppendLine("BODYFORMAT: html")
sb.AppendLine("BODY: <p>Dear customer, your invoice is attached.</p>")
System.IO.File.WriteAllText(pfad, sb.ToString(), New System.Text.UTF8Encoding(False))
Process.Start("C:\Program Files\BoMail\bomail.exe", """" & pfad & """")
// Write control file as UTF-8 (no BOM), then launch BoMail
string pfad = @"C:\temp\bm.dat";
var lines = new[] {
"TO: kunde@bomail.at",
"SUBJECT: Invoice 4711",
@"ATT: C:\temp\invoice.pdf",
"BODYFORMAT: html",
"BODY: <p>Dear customer, your invoice is attached.</p>",
};
System.IO.File.WriteAllLines(pfad, lines, new System.Text.UTF8Encoding(false));
System.Diagnostics.Process.Start(@"C:\Program Files\BoMail\bomail.exe", $"\"{pfad}\"");
$pfad = 'C:\temp\bm.dat'
$lines = @(
'TO: kunde@bomail.at',
'SUBJECT: Invoice 4711',
'ATT: C:\temp\invoice.pdf',
'BODYFORMAT: html',
'BODY: <p>Dear customer, your invoice is attached.</p>'
)
# UTF-8 without BOM (PowerShell 7+: -Encoding utf8NoBOM)
$lines | Set-Content -Path $pfad -Encoding utf8NoBOM
Start-Process 'C:\Program Files\BoMail\bomail.exe' -ArgumentList "`"$pfad`""
@echo off
chcp 65001 >nul
set "DAT=C:\temp\bm.dat"
(
echo TO: kunde@bomail.at
echo SUBJECT: Invoice 4711
echo BODYFORMAT: text
echo BODY: Dear customer, please find your invoice.
) > "%DAT%"
start "" "C:\Program Files\BoMail\bomail.exe" "%DAT%"
The call works whether BoMail is already running or not. A running instance is reused — no second window opens.
After reading, BoMail removes the control file. Your application does not need to clean it up.
The composer opens pre-filled but nothing is sent automatically. The user reviews, edits, and presses Send.
Any ATT path that does not exist is skipped; the composer opens and a warning lists what was missing.
If no real mailbox exists yet, BoMail shows an information message instead of opening a composer.
A .dat file with no recognizable mail directive is ignored, so unrelated files cannot trigger a composer.
| Symptom | Cause & fix |
|---|---|
| Nothing happens at all | Usually a leading slash in the path (/C:/...) or a wrong path — BoMail cannot find the file. Pass C:\temp\bm.dat without a leading slash. |
| Umlauts / special characters broken | The file was not written as UTF-8. Use UTF-8 (the ADODB.Stream / UTF8Encoding / chcp 65001 approaches above). |
| HTML shown as raw text | Body was detected as plain text. Add BODYFORMAT: html. |
Tags like <x> swallowed in a text mail | Plain text starting with < was detected as HTML. Add BODYFORMAT: text. |
| Attachment not present | The ATT path did not exist at launch time. Check the absolute path; a warning lists skipped files. |