Collection of e-mail functions.
Methods
send
send(smtpSettings: { host: string, port?: number, auth?: { user: string, pass: string }, secure?: boolean }, mailOptions: { from: string, to: string | string[], cc?: string | string[], bcc?: string | string[], subject: string, text?: string, html?: string, attachments?: { filename: string, content?: string, path?: string, contentType?: string, encoding?: string, cid?: string }[] })
Send an e-mail to one or more recipients.
Parameters
smtpSettings { host: string, port?: number, auth?: { user: string, pass: string }, secure?: boolean }
The SMTP connection settings.
mailOptions { from: string, to: string | string[], cc?: string | string[], bcc?: string | string[], subject: string, text?: string, html?: string, attachments?: { filename: string, content?: string, path?: string, contentType?: string, encoding?: string, cid?: string }[] }
The mail options. Includes the from, to, subject, text and html properties.
Return type
{ accepted: string[], rejected: string[], envelopeTime: number, messageTime: number, messageSize: number, response: string, envelope: { from: string, to: string[] } }
Examples
Last updated