| Schemes | mailto://, mailtos:// |
| Cargo feature | service-email |
| Body formats | html, text (first is the default) |
| Attachments | yes |
| Title length | 250 characters |
| Body length | 32,768 characters |
| Body lines | unlimited |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
{schema}://{host}
{schema}://{host}:{port}
{schema}://{host}:{port}/{targets}
{schema}://{host}/{targets}
{schema}://{user}@{host}
{schema}://{user}@{host}/{targets}
{schema}://{user}@{host}:{port}
{schema}://{user}@{host}/{targets}
{schema}://{user}@{host}:{port}/{targets}
{schema}://{user}:{password}@{host}
{schema}://{user}:{password}@{host}/{targets}
{schema}://{user}:{password}@{host}:{port}
{schema}://{user}:{password}@{host}:{port}/{targets}
{schema} is one of mailto://, mailtos://.
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{host} | Domain | string | yes | ||
{password} | Password | string | no | secret | |
{port} | Port | int, 1 to 65535 | no | ||
{target_email} | Target Email | string | no | ||
{targets} | Targets | list | no | any of target_email; separated by / | |
{user} | User Name | string | no |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
bcc | Blind Carbon Copy | list | separated by , or space | |
cc | Carbon Copy | list | separated by , or space | |
from | From Email | string | ||
inline | Inline Attachments | bool | no | |
mode | Secure Mode | choice | starttls (usually; depends on the URL) | one of starttls, ssl, insecure |
name | From Name | string | ||
pgp | PGP Security Mode | choice | no (usually; depends on the URL) | one of no, sign, encrypt; sign: Ed25519 or RSA (2048 to 8192 bits) private key; encrypt: cv25519 or RSA public key; without the service-email-pgp feature a PGP mode fails with Unsupported |
pgpprv | PGP Private Key Path | string | secret; path, file:// or http(s)://; default: the storage folder | |
pgppub | PGP Public Key Path | string | secret; path, file:// or http(s)://; default: the storage folder | |
reply | Reply To | list | separated by , or space | |
smtp | SMTP Server | string | ||
to | To Email | string | ||
wkd | Web Key Directory | bool | no |
Prefixed parameters:
+name=value: Email Header
The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.
Examples
Accepted URLs (tokens are fake):
mailto://localhost
mailto://user:pass@gmail.com
mailtos://user:pass123@outlook.com.au
mailtos://user:pass@nuxref.com:567/l2g@nuxref.com
mailto://user:pass@localhost/test@example.com/test2@/$@!/
mailtos://user:pass@nuxref.com?from=@
mailto://user:pass@fastmail.com?tz=UTC
mailto://user:pass@nuxref.com?mode=ssl
Rejected URLs:
mailto://
mailtos://
mailto://:@/
mailtos://:pass@nuxref.com:567
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'mailto://localhost'
Notes
E-Mail (mailto://, mailtos://): sends the notification as e-mail over SMTP.
SMTP with STARTTLS or implicit TLS, AUTH CRAM-MD5/PLAIN/LOGIN, the provider template table (Gmail, Outlook, Yahoo, …), To/Cc/Bcc/Reply-To, HTML + text multipart/alternative, attachments (inline with ?inline=yes) and ?+X-Header=value.
Differences with Apprise
?pgp=sign(featureservice-email-pgp) signs with Ed25519 keys (GnuPG’s encoding) and RSA keys of 2048 to 8192 bits, while Apprise also accepts DSA, ECDSA and smaller RSA keys: mercurio’s OpenPGP is its own, built onring, and covers those two.?pgp=encrypt(and?pgp=signwhen the recipient’s key is at hand) encrypts to Curve25519 (cv25519) and RSA keys, without compression, while Apprise compresses the message (ZIP) and also encrypts to ECDH keys on the NIST, Brainpool and secp256k1 curves.?wkd=yesasks a recipient’s Web Key Directory (RFC 9080) only when no key is in?pgppub=or the storage folder, as in Apprise, but asks both URLs at once, where Apprise tries the direct URL only after theopenpgpkey.one fails; theopenpgpkey.answer still wins.- When encryption needs a key pair and none exists (a message to oneself, or the Autocrypt header advertising ours), mercurio generates an Ed25519 key with a Curve25519 encryption subkey, while Apprise generates RSA 2048 keys; both write
<local>-pub.ascand<local>-prv.ascto the storage folder (asset: pgp_autogen: noturns it off). ?reply=with several targets raised on the second target in Apprise, while mercurio sends it.