/tool/e-mail/send

send

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.


tool/e-mail/send

Type: Command

通过 /tool/e-mail 中的 SMTP 服务器发送一条电子邮件消息。提供给命令的参数会覆盖此消息的服务器设置。结果显示在 /tool/e-mail 的 last-status 中。请参阅 电子邮件。

参数类型描述
serveralt { ipv6: ip6Addr , ip: ipAddr , fqdn: string }SMTP 服务器的 IP 地址、IPv6 地址或 FQDN。如果未指定,则使用服务器配置中的值。
portnumSMTP 服务器端口。如果未指定,则使用服务器配置中的值。
tomulti { array-id, to: string }目标电子邮件地址。允许使用多个地址,用逗号分隔;路由器会向所有这些地址发送一条消息。
ccmulti { array-id, cc: string }向列出的收件人发送副本。允许使用多个地址,用逗号分隔。
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.
subjectstring消息的主题。
bodystring电子邮件消息的正文文本。\n 开始新的一行。
filemulti { array-id, file: file }要附加到电子邮件的文件名列表,用逗号分隔。每个文件都以 application/octet-stream 附加。不存在的文件会在发送前被拒绝(input does not match any value of file)。
userstring用于向 SMTP 服务器认证的用户名(AUTH PLAIN;没有 TLS 时不加密)。如果未指定,则使用服务器配置中的值。
passwordstring用于向 SMTP 服务器认证的密码。如果未指定,则使用服务器配置中的值。
tlsenum (no | yes | starttls)TLS 加密模式。如果未指定,则使用服务器配置中的值: - no - 不使用 TLS。即使服务器提供 STARTTLS,路由器也不会发送 STARTTLS。 - yes - 从连接开始就使用 TLS(隐式 TLS,通常为端口 465)。 - starttls - 使用 STARTTLS 升级连接(通常为端口 587)。当服务器不提供 STARTTLS 时,发送会失败并显示 TLS not supported by server;不会回退到未加密连接。
certificate-verificationenum (no | yes | yes-without-crl)TLS 证书验证。如果未指定,则使用服务器配置中的值: - no - 路由器加密连接但不检查服务器证书。 - yes - 根据本地证书存储验证证书链,包括服务器名称。内置信任存储默认涵盖电子邮件。 - yes-without-crl - 验证证书但不执行 CRL 检查。