Developer API

BoMail PRO Developer API

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.

Quick Start View Examples
What it is

Send mail from your app — without building one

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.

📨

No mail engine to build

Your application never touches SMTP, encoding or MIME. It just writes a text file — BoMail handles composing and sending.

📎

Real attachments

Unlike a plain mailto: link, the control file can attach one or more files — something mailto: simply cannot do.

🔒

Local & sovereign

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.

Quick Start

Three steps to a sent email

1

Write a control file

Create a UTF-8 text file (e.g. bm.dat) with the directives described below.

2

Launch BoMail with the file path

Pass the absolute path of the control file as the single argument.

3

The composer opens pre-filled

BoMail fills recipients, subject, attachments and body, deletes the control file, and shows the composer. The user clicks Send.

Command line
"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.

Control File

Format & rules

One directive per line, in the form KEY: value. Keys are case-insensitive.

bm.dat · UTF-8
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>
📋

One value per line

TO, CC, BCC and ATT may appear multiple times — one recipient or one file per line.

🔤

UTF-8 only

Write the file as UTF-8 (with or without BOM). Other encodings will garble umlauts and special characters.

⬇️

BODY goes last

BODY must be the final directive. Everything after it — including multi-line HTML — is treated as the message body.

Reference

Directive reference

DirectiveCardinalityDescription
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.

Body & Signature

HTML, plain text, and signatures

🧭

Automatic detection

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>).

🎛️

Explicit override

Set BODYFORMAT: html or BODYFORMAT: text to remove all ambiguity — useful when plain text happens to begin with <.

✍️

Signature appended

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.

Examples

Generating the control file

Pick your language — write the file, then launch BoMail.

VB.NET (.NET Framework 4.8)
' 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 & """")
C# (.NET)
// 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}\"");
PowerShell
$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`""
Batch (chcp 65001 = UTF-8)
@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%"
Behavior

Runtime & lifecycle

🪟

Single instance aware

The call works whether BoMail is already running or not. A running instance is reused — no second window opens.

🗑️

Control file is deleted

After reading, BoMail removes the control file. Your application does not need to clean it up.

User confirms send

The composer opens pre-filled but nothing is sent automatically. The user reviews, edits, and presses Send.

📎

Missing attachments skipped

Any ATT path that does not exist is skipped; the composer opens and a warning lists what was missing.

📭

No mailbox configured

If no real mailbox exists yet, BoMail shows an information message instead of opening a composer.

🛡️

Plausibility check

A .dat file with no recognizable mail directive is ignored, so unrelated files cannot trigger a composer.

Troubleshooting

Common pitfalls

SymptomCause & fix
Nothing happens at allUsually 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 brokenThe file was not written as UTF-8. Use UTF-8 (the ADODB.Stream / UTF8Encoding / chcp 65001 approaches above).
HTML shown as raw textBody was detected as plain text. Add BODYFORMAT: html.
Tags like <x> swallowed in a text mailPlain text starting with < was detected as HTML. Add BODYFORMAT: text.
Attachment not presentThe ATT path did not exist at launch time. Check the absolute path; a warning lists skipped files.