Mail

On this page

Mail: messages, servers and the spool

The Mail page shows the mail that your application sends through bx-mail (bx:mail): every message with its preview, where it went, how long it took, what failed, and what waits in the spool.

It is a BoxLang+ page. Without a license it shows three counters and the last ten messages (see Without BoxLang+).

The Mail overview

Turn it on

The integration is off until an admin turns it on, under Modules, Integrations, on the Mail page itself, or with collectors.mail.enabled in boxlang.json. With it off Lens registers no listener.

It needs a bx-mail build that announces the onMail* events (onMailInvocation, onMailSpooled, onMailSent, onMailError, onMailBounce and onMailSpoolRun). Lens listens to them and never reads the classes of bx-mail. The spool and the settings are read through documented services (the cache service and the module settings).

Tabs

TabShows
OverviewSent, failed, spooled, send time, failovers, a chart, the spool, the servers and what needs attention.
MessagesA list like a mail client, with search and a state filter. Pick a message for its Preview, HTML and Text source, Headers, Parts, Attachments and Delivery (each attempt, the server, the failover, the error). Copy as JSON and Open the request that sent it.
ServersEach SMTP server from the settings (no password is read) with attempts, failures, p95 and how often it served after a failure.
QueueMessages waiting in the spool and messages that bounced, with the error. An admin can send a bounced message again or discard an entry. Every action is audited.
SettingsThe settings of bx-mail, read only, secrets hidden, with notes on risky choices such as a remote server without TLS.

What needs attention

Failure rate above collectors.mail.failurePct (after minMessages), bounces, a spool older than spoolMinutes, a server with a high failure rate, and failovers.

A message with its preview

The preview is locked

The HTML of a message is shown in a sandboxed frame: no scripts, no forms, no network. Remote images and styles do not load, because the console never loads anything from another origin. Inline images (cid:) show when they are small (256 KB) and are image types.

What is kept

Messages hold personal data and links such as password resets, so:

  • Everything stays in memory, bounded (Free 10 messages in the last hour, BoxLang+ collectors.mail.maxMessages, 200 by default, for 48 hours). Nothing is written to the store.
  • collectors.mail.capture is meta by default: addresses, subject, sizes, headers and delivery. Set it to full (BoxLang+) to keep the text parts (100,000 characters each, secrets hidden) and small inline images.
  • Attachments are never kept: only name, type and size.
  • The text of a message is for an admin. A viewer sees the same message without its parts.
  • Secret looking header values are hidden.

Without BoxLang+

Free keeps three counters (sent, failed and spooled in the last hour) and the last ten messages with addresses and subject. The viewer with preview and search, the queue with its actions, the servers and the settings answer 403 and show a BoxLang+ note. See Licensing.

Settings

See collectors.mail. The settings of bx-mail itself (servers, spool, TLS) stay in its own settings. Lens does not write them.