Ledger sends email for three things: scheduled reports, email alerts, and the security notifications of the local password policy. All of them go out through one SMTP configuration under Settings > Mail, which only administrators can open, and all of them are queued and delivered by the Ledger scheduler. Nothing is sent directly from a web request, except the Test email described below.
Mail settings

| Setting | Default | Description |
|---|---|---|
| Enable Email | On | Turns email on. While it is off, nothing is queued: scheduled reports are generated but not mailed, and alerts and security notifications are discarded. Messages that would have been sent while it was off are not delivered later. The Test button still works, so you can verify a relay before turning mail on. |
| Anonymous Forwarding | Off | Relays mail without SMTP authentication. See Anonymous Forwarding. |
| Primary Admin Name | Blank | Sender display name of every message Ledger sends. Fill it in; once the form has been saved with this field blank, test emails go out with an empty display name. |
| Primary Admin Email | Blank | Sender address of every message, and the recipient of the security notifications enabled under Settings > Authentication > Local. Fill it in with an address your relay is allowed to send as. Once the form has been saved with this field blank, test emails use an empty sender, which most relays reject, and security notifications are skipped. |
| SMTP Server | Host name or IP address of the relay. Nothing is sent while this is empty; queued messages wait. | |
| SMTP Port | 587 | TCP port. Typical values are 25 (plain or STARTTLS relay), 587 (submission with STARTTLS), and 465 (implicit TLS). |
| SMTP Security | None | None for a plain connection, TLS for a plain connection upgraded with STARTTLS, or SSL for TLS from the first byte. See Transport security. |
| SMTP Username | Account used for authentication (AUTH PLAIN). Leave it empty for a relay that does not require authentication. Hidden while Anonymous Forwarding is on. | |
| SMTP Password | Stored encrypted. Leave the field blank when saving to keep the stored value. Hidden while Anonymous Forwarding is on. |
Settings take effect on the next delivery, without a restart. Save stores every field on the page at once.
The relay's TLS certificate must be trusted by the CA bundle inside the Ledger web and scheduler containers (/etc/ssl/certs/ca-certificates.crt), and must match the SMTP Server name. The trust store of the host the containers run on is not used. Prefer a relay with a publicly trusted certificate, or mount a CA bundle that includes your CA over that path in both containers. There is no setting in the interface to turn verification off.
Anonymous Forwarding
Many sites run an internal relay (Postfix, an Exchange receive connector, or a cloud provider's relay) that accepts mail from trusted networks by source address and rejects or does not offer authentication. Anonymous Forwarding is for that case:
- Ledger connects, negotiates TLS as configured, and sends the message without ever authenticating, even if a username and password are still stored.
- The SMTP Username and SMTP Password fields are hidden while the switch is on. Credentials saved earlier are kept, and turning the switch off again restores them.
- Transport security is not affected. Pair Anonymous Forwarding with TLS or SSL whenever the relay supports it, so that messages, which can carry report data and host names, do not cross the network in clear text.

Without Anonymous Forwarding, Ledger authenticates only when an SMTP Username is set. An empty username also gives an unauthenticated session but keeps the password fields visible; use the switch when you want the intent to be explicit.
Make sure the relay only accepts anonymous mail from the addresses the Ledger web and scheduler services connect from. An open relay is a spam vector, and Ledger cannot protect the relay from that.
Transport security
| SMTP Security | Connection | Behavior |
|---|---|---|
| None | Plain TCP | No encryption. Works only for an unauthenticated relay (Anonymous Forwarding on, or no SMTP Username), unless the relay is localhost: Ledger refuses to send credentials over an unencrypted connection to any other host, so None with a username fails with unencrypted connection. Use TLS or SSL for authenticated relays. |
| TLS | Plain TCP, then STARTTLS | Fails closed: if the server does not offer STARTTLS, the message is not sent and the attempt is logged as TLS security is required but the SMTP server does not advertise STARTTLS. Credentials are only sent after the upgrade. |
| SSL | TLS from the first byte (implicit TLS, usually port 465) | The TLS handshake happens before any SMTP command. |
Ledger allows 15 seconds to connect and 60 seconds for the whole exchange, so a stalled relay cannot hold up delivery.
Testing the configuration
Save first: the test uses the saved settings, not the values in the form. Then click Test, enter a recipient, and click Test in the dialog.

The message is sent immediately from the Ledger web service, using the same transport code as queued mail, and the result is shown as a notification:
| Notification | Meaning |
|---|---|
| Test Email Sent. | The relay accepted the message. Check the mailbox, and its spam folder, to confirm delivery. |
| Test Email Failed. | The relay refused the connection, the TLS handshake or certificate check failed, STARTTLS was required but not offered, authentication failed, or the sender or recipient was rejected. The interface shows only this generic message; see Troubleshooting. |
| No SMTP server is configured. | SMTP Server is empty. |

The test works whether or not Enable Email is on, so you can verify a relay before turning mail on for reports and notifications.
How queued mail is delivered
Scheduled reports, alerts, and security notifications are added to a mail queue, with the sender taken from Primary Admin Name and Primary Admin Email. The Ledger scheduler checks the queue every minute:
- If Enable Email is off, or no SMTP Server is configured, nothing is sent and messages already in the queue stay there until mail is enabled and a relay is set. While Enable Email is off, no new messages are queued either.
- Each due message is sent with the current settings. On success, it is removed from the queue and recorded in the email log.
- On failure, the message stays in the queue with its attempt count and error, the failure is recorded in the email log, and the message is retried 5, 10, 20, 40, 80 minutes, and so on, after it was created.
- For alerts, the alert's entry under Alerts > Logs is also updated with the delivery result.
Fixing the mail settings therefore repairs delivery of everything still in the queue. There is no need to re-run a report after correcting a wrong password.
Troubleshooting
- Test Email Failed. with no other detail: the web service does not log the SMTP or TLS error behind the message. To see it, let the scheduler send something with the same settings, for example by queuing a scheduled report or an email alert; the error for each attempt is recorded with the queued message and in the email log in the Ledger database. If an alert sent the message, its entry under Alerts > Logs shows the delivery status.
x509: certificate signed by unknown authority, or a certificate name mismatch: the relay presents a certificate the Ledger containers do not trust, or SMTP Server does not match the name in the certificate. Use the relay's DNS name, or add your CA to the containers' CA bundle (see Mail settings). Installing the CA on the host alone has no effect.535 Authentication failedor530 Authentication required: the credentials are wrong, or the relay requires authentication while Anonymous Forwarding is on. Turn the switch off and check the username and password.554 Relay access deniedwith Anonymous Forwarding: the relay does not trust the address Ledger connects from. Allow that address in the relay's configuration (for example, Postfixmynetworksor an Exchange receive connector), or use an authenticated account instead.TLS security is required but the SMTP server does not advertise STARTTLS: the relay has no STARTTLS on that port. Use port 587, switch SMTP Security to SSL for an implicit TLS port (465), or to None for a trusted internal relay.- Reports arrive but security notifications do not: notifications go to the Primary Admin Email and are skipped while it is empty (the web service logs
not queued: Primary Admin Email is not set) or while Enable Email is off. Also check that Notify Primary Admin is on under Settings > Authentication > Local. - Mail stopped after an upgrade or restore: the SMTP password is stored encrypted with Ledger's installation secrets. If those secrets changed, enter the SMTP Password again.