Mail

Sends an email through SMTP.

This function is exported by the KS module.

Mail(Recipients, Subject, Message , Options)

Parameters

Recipients

A recipient or list of recipients.

Subject

Type: String

The message subject.

Message

Type: String

The message body.

Options

A Map containing zero or more of the following keys:

KeyValue
attachmentsA path or Array of attachment paths.
bccA recipient or Array of blind-copy recipients.
ccA recipient or Array of copy recipients.
fromComma-separated From address.
replytoComma-separated Reply-To address.
hostSMTP hostname and port in hostname:port form.
headerAdditional header text.

Security warning: Avoid embedding mail credentials in a script. Use an operating-system credential store or another protected configuration mechanism.