@oneblink/sdk
    Preparing search index...

    Interface SendMailOptions

    The message data accepted by sendMail. MailComposerOptions describes the fields the MIME tree is built from, the fields below are the ones the mailer reads on top of those

    interface SendMailOptions {
        _dkim?: DKIMOptions;
        alternatives?: MailComposerAlternative[];
        amp?: string | Buffer<ArrayBufferLike> | Readable | MailComposerAlternative;
        attachDataUrls?: boolean;
        attachments?: MailComposerAttachment[];
        auth?: SMTPTransportAuthOptions;
        baseBoundary?: string;
        bcc?: MimeNodeAddressInput;
        boundaryPrefix?: string;
        cc?: MimeNodeAddressInput;
        date?: string | Date;
        disableFileAccess?: boolean;
        disableUrlAccess?: boolean;
        dkim?: DKIMOptions;
        dsn?: SMTPEnvelopeDsn;
        encoding?: string;
        envelope?: MimeNodeEnvelopeInput;
        from?: MimeNodeAddressInput;
        headers?: MimeNodeHeaders;
        html?:
            | string
            | Buffer<ArrayBufferLike>
            | Readable
            | MailComposerAlternative;
        icalEvent?:
            | string
            | Buffer<ArrayBufferLike>
            | Readable
            | MailComposerIcalEvent;
        inReplyTo?: string;
        list?: MailComposerListHeaders;
        maxRecipients?: number;
        messageId?: string;
        newline?: string;
        normalizeHeaderKey?: (key: string, value: string) => string;
        otp?: MailComposerOtp;
        priority?: string;
        raw?: MimeNodeContent;
        references?: string | string[];
        replyTo?: MimeNodeAddressInput;
        requireTLSExtensionEnabled?: boolean;
        sender?: MimeNodeAddressInput;
        ses?: SESSendEmailRequest;
        subject?: string;
        text?:
            | string
            | Buffer<ArrayBufferLike>
            | Readable
            | MailComposerAlternative;
        textEncoding?: MailComposerTextEncoding;
        to?: MimeNodeAddressInput;
        watchHtml?:
            | string
            | Buffer<ArrayBufferLike>
            | Readable
            | MailComposerAlternative;
        xMailer?: string | false;
    }

    Hierarchy

    • MailComposerOptions
      • SendMailOptions
    Index
    _dkim?: DKIMOptions

    Extra DKIM options for this message, merged over the options of the signer. The SES transport sets skipFields here, the option is not meant for callers

    alternatives?: MailComposerAlternative[]

    Further alternatives for the multipart/alternative node, after text, watchHtml, amp, html and the calendar event

    amp?: string | Buffer<ArrayBufferLike> | Readable | MailComposerAlternative

    AMP4EMAIL version of the message

    attachDataUrls?: boolean

    Convert data: images in the html into embedded attachments, read by the mailer

    attachments?: MailComposerAttachment[]
    auth?: SMTPTransportAuthOptions

    SMTP transports: per-message authentication settings, used instead of the transport level auth. Only the credential fields are taken from it (type, user, pass, accessToken, refreshToken, expires), the token endpoint and client settings stay those of the transport

    baseBoundary?: string

    Shared part of the unique multipart boundary

    bcc?: MimeNodeAddressInput
    boundaryPrefix?: string

    Prefix for the generated multipart boundaries

    cc?: MimeNodeAddressInput
    date?: string | Date

    Date header value, the current time when missing

    disableFileAccess?: boolean

    Reject content that points to a file path

    disableUrlAccess?: boolean

    Reject content that points to a URL

    dkim?: DKIMOptions

    DKIM signing options for this message, used instead of the ones of the transporter

    dsn?: SMTPEnvelopeDsn

    SMTP transports: DSN parameters for the envelope, sent when the server supports the DSN extension

    encoding?: string

    Content-Transfer-Encoding to force for the text/* nodes that do not set their own

    envelope?: MimeNodeEnvelopeInput

    SMTP envelope to use instead of the one generated from the headers

    from?: MimeNodeAddressInput
    headers?: MimeNodeHeaders

    Custom headers for the root node, the standard headers above override them

    html?: string | Buffer<ArrayBufferLike> | Readable | MailComposerAlternative

    HTML version of the message

    icalEvent?: string | Buffer<ArrayBufferLike> | Readable | MailComposerIcalEvent

    iCalendar event, included both as a text/calendar alternative and as an application/ics attachment

    inReplyTo?: string
    list?: MailComposerListHeaders

    List-* headers, read by the mailer

    maxRecipients?: number

    Recipients allowed on this message, 0 disables the limit, defaults to 100000

    messageId?: string

    Message-ID header value, generated when missing

    newline?: string

    'win' for CRLF and 'linux' for LF line breaks in the generated message, kept as is when not set

    normalizeHeaderKey?: (key: string, value: string) => string

    Method to normalize header keys for custom caseing

    otp?: MailComposerOtp

    One-time passcode for the OTP-Token header. An invalid value makes compile() throw an EOTP error

    priority?: string

    'high', 'normal' or 'low', sets the priority headers, read by the mailer

    raw?: MimeNodeContent

    Pregenerated rfc822 message, used as is instead of building one

    references?: string | string[]
    replyTo?: MimeNodeAddressInput
    requireTLSExtensionEnabled?: boolean

    SMTP transports: RFC 8689, send the REQUIRETLS parameter with MAIL FROM

    sender?: MimeNodeAddressInput
    ses?: SESSendEmailRequest

    SES transport: extra SendEmailCommand parameters merged into the API call

    subject?: string
    text?: string | Buffer<ArrayBufferLike> | Readable | MailComposerAlternative

    Plaintext version of the message

    textEncoding?: MailComposerTextEncoding

    Header string encoding, 'Q' (the default) or 'B', 'quoted-printable' and 'base64' are accepted as well

    to?: MimeNodeAddressInput
    watchHtml?:
        | string
        | Buffer<ArrayBufferLike>
        | Readable
        | MailComposerAlternative

    Apple Watch specific HTML version of the message

    xMailer?: string | false

    X-Mailer header value, false leaves the header out, read by the mailer