Skip to main content
Version: 7.25

send


tool/e-mail/send​

Type: Command

Sends one email message through the SMTP server in /tool/e-mail. Parameters given to the command override the server settings for this message. The result shows in last-status of /tool/e-mail. See Email.

ArgumentTypeDescription
serveralt { ipv6: ip6Addr , ip: ipAddr , fqdn: string }SMTP server IP address, IPv6 address, or FQDN. If not specified, the value from the server configuration is used.
portnumSMTP server port. If not specified, the value from the server configuration is used.
tomulti { array-id, to: string }Destination email address. Several addresses are allowed, separated by commas; the router sends one message to all of them.
ccmulti { array-id, cc: string }Send a copy to listed recipients. Multiple addresses allowed, separated by commas.
fromstringName or email address that will appear as the sender. If not specified, the value from the server configuration is used; when that is empty too, the sender is <>, which many servers refuse.
subjectstringThe subject of the message.
bodystringThe body text of the email message. \n starts a new line.
filemulti { array-id, file: file }List of file names to attach to the email, separated by commas. Each file is attached as application/octet-stream. A file that does not exist is refused before sending (input does not match any value of file).
userstringUsername used to authenticate to an SMTP server (AUTH PLAIN; unencrypted without TLS). If not specified, the value from the server configuration is used.
passwordstringPassword used to authenticate to an SMTP server. If not specified, the value from the server configuration is used.
tlsenum (no | yes | starttls)

TLS encryption mode. If not specified, the value from the server configuration is used:

  • no - No TLS. The router does not send STARTTLS, also when the server offers it.
  • yes - TLS from the start of the connection (implicit TLS, usually port 465).
  • starttls - Upgrade the connection with STARTTLS (usually port 587). When the server does not offer STARTTLS, the send fails with TLS not supported by server; there is no fallback to an unencrypted connection.
certificate-verificationenum (no | yes | yes-without-crl)

TLS certificate validation. If not specified, the value from the server configuration is used:

  • no - The router encrypts the connection but does not check the server's certificate.
  • yes - Validates the certificate chain against the local certificate store, including the server name. The built-in trust store covers email by default.
  • yes-without-crl - Validates the certificate without performing a CRL check.