Represents options for setting up the SMTP connection. This interface is compatible with SMTPConnection.Options of nodemailer. This API is experimental and might change in newer versions. Use with caution.

Hierarchy

Properties

connection?: Socket

Connected socket to use instead of creating and connecting a new one. If secure option is true, then socket is upgraded from plaintext to ciphertext.

connectionTimeout?: number

How many milliseconds to wait for the connection to establish.

debug?: boolean

If set to true, then logs SMTP traffic and message content, otherwise logs only transaction events.

greetingTimeout?: number

How many milliseconds to wait for the greeting after connection is established.

ignoreTLS?: boolean

Turns off STARTTLS support if true.

opportunisticTLS?: boolean

Tries to use STARTTLS and continues normally if it fails.

proxy?: string

A proxy URL used for connecting the SMTP server. This value will be forwarded to the underlying nodemailer lib, so it handles the proxy job for the SDK.

requireTLS?: boolean

Forces the client to use STARTTLS. Returns an error if upgrading the connection is not possible or fails.

secure?: boolean

Defines if the connection should use SSL (if true) or not (if false).

socket?: Socket

Initialized socket to use instead of creating a new one.

socketTimeout?: number

How many milliseconds of inactivity to allow.

tls?: ConnectionOptions

Defines additional options to be passed to the socket constructor.

Example

{ rejectUnauthorized: true }

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