Represents configurations for sending an e-mail. This interface is compatible with Mail.Options of nodemailer.

interface MailConfig {
    attachments?: Attachment[];
    bcc?: string | Address | (string | Address)[];
    cc?: string | Address | (string | Address)[];
    date?: string | Date;
    encoding?: string;
    from?: string | Address;
    headers?: Headers;
    html?:
        | string
        | Buffer
        | Readable
        | AttachmentLike;
    priority?: "high" | "normal" | "low";
    replyTo?: string | Address | (string | Address)[];
    sender?: string | Address;
    subject?: string;
    text?:
        | string
        | Buffer
        | Readable
        | AttachmentLike;
    to?: string | Address | (string | Address)[];
}

Properties

attachments?: Attachment[]

Array of attachment objects.

bcc?: string | Address | (string | Address)[]

Comma separated list or array of recipients e-mail addresses that will appear in the "Bcc:" field.

cc?: string | Address | (string | Address)[]

Comma separated list or array of recipients' e-mail addresses that will appear in the "Cc:" field.

date?: string | Date

Date value, current UTC string will be used if not set.

encoding?: string

Transfer encoding for the textual parts.

from?: string | Address

The e-mail address of the sender. E-mail addresses can be plain 'sender@server.com' or formatted 'Sender Name sender@server.com'.

headers?: Headers

Object or array with additional headers.

html?:
    | string
    | Buffer
    | Readable
    | AttachmentLike

The HTML version of the message.

priority?: "high" | "normal" | "low"

Priority of the e-mail.

replyTo?: string | Address | (string | Address)[]

Comma separated list or array of e-mail addresses that will appear in the "Reply-To:" field.

sender?: string | Address

E-mail address that will appear in the "Sender:" field.

subject?: string

Subject of the e-mail.

text?:
    | string
    | Buffer
    | Readable
    | AttachmentLike

Plaintext version of the message.

to?: string | Address | (string | Address)[]

Comma separated list or array of recipients' e-mail addresses that will appear in the "To:" field.

Copyright Ⓒ 2024 SAP SE or an SAP affiliate company. All rights reserved.