Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Optional alternatives

alternatives: Attachment[]

An array of alternative text contents (in addition to text and html parts)

Optional attachments

attachments: Attachment[]

An array of attachment objects

Optional auth

Optional authMethod

authMethod: undefined | string

defines preferred authentication method, e.g. ‘PLAIN’

Optional bcc

bcc: string | Address | Array<string | Address>

Comma separated list or an array of recipients e-mail addresses that will appear on the Bcc: field

Optional cc

cc: string | Address | Array<string | Address>

Comma separated list or an array of recipients e-mail addresses that will appear on the Cc: field

Optional component

component: undefined | string

Optional connection

connection: net.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

Optional connectionTimeout

connectionTimeout: ms

how many milliseconds to wait for the connection to establish

Optional date

date: Date | string

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

Optional debug

debug: undefined | false | true

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

Optional disableFileAccess

disableFileAccess: undefined | false | true

if set to true then fails with an error when a node tries to load content from a file

Optional disableUrlAccess

disableUrlAccess: undefined | false | true

if set to true then fails with an error when a node tries to load content from URL

Optional dkim

dkim: Options

is an object with DKIM options

Optional dsn

Optional encoding

encoding: undefined | string

optional transfer encoding for the textual parts

Optional envelope

envelope: Envelope | Envelope

optional SMTP envelope, if auto generated envelope is not suitable

Optional from

from: string | Address

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

Optional greetingTimeout

greetingTimeout: ms

how many milliseconds to wait for the greeting after connection is established

Optional headers

headers: Headers

An object or array of additional header fields

Optional host

host: undefined | string

the hostname or IP address to connect to (defaults to ‘localhost’)

Optional html

html: string | Buffer | Readable | AttachmentLike

The HTML version of the message

Optional icalEvent

icalEvent: string | Buffer | Readable | IcalAttachment

iCalendar event, same usage as with text and html. Event method attribute defaults to ‘PUBLISH’ or define it yourself: {method: 'REQUEST', content: iCalString}. This value is added as an additional alternative to html or text. Only utf-8 content is allowed

Optional ignoreTLS

ignoreTLS: undefined | false | true

turns off STARTTLS support if true

Optional inReplyTo

inReplyTo: string | Address

The message-id this message is replying

Optional list

An object where key names are converted into list headers. List key help becomes List-Help header etc.

Optional localAddress

localAddress: undefined | string

the local interface to bind to for network connections

Optional logger

logger: Logger | boolean

optional bunyan compatible logger instance. If set to true then logs to console. If value is not set or is false then nothing is logged

Optional maxConnections

maxConnections: undefined | number

the count of maximum simultaneous connections to make against the SMTP server (defaults to 5)

Optional maxMessages

maxMessages: undefined | number

limits the message count to be sent using a single connection (defaults to 100). After maxMessages is reached the connection is dropped and a new one is created for the following messages

Optional messageId

messageId: undefined | string

optional Message-Id value, random value will be generated if not set

Optional name

name: undefined | string

optional hostname of the client, used for identifying to the server

Optional opportunisticTLS

opportunisticTLS: undefined | false | true

tries to use STARTTLS and continues normally if it fails

pool

pool: true

set to true to use pooled connections (defaults to false) instead of creating a new connection for every email

Optional port

port: undefined | number

the port to connect to (defaults to 25 or 465)

Optional rateDelta

rateDelta: undefined | number

defines the time measuring period in milliseconds (defaults to 1000, ie. to 1 second) for rate limiting

Optional rateLimit

rateLimit: undefined | number

limits the message count to be sent in rateDelta time. Once rateLimit is reached, sending is paused until the end of the measuring period. This limit is shared between connections, so if one connection uses up the limit, then other connections are paused as well. If rateLimit is not set then sending rate is not limited

Optional raw

raw: string | Buffer | Readable | AttachmentLike

if set then overwrites entire message output with this value. The value is not parsed, so you should still set address headers or the envelope value for the message to work

Optional references

references: string | string[]

Message-id list (an array or space separated string)

Optional replyTo

replyTo: string | Address

An e-mail address that will appear on the Reply-To: field

Optional requireTLS

requireTLS: undefined | false | true

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

Optional secure

secure: undefined | false | true

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

Optional sender

sender: string | Address

An e-mail address that will appear on the Sender: field

Optional service

service: undefined | string

Optional socket

socket: net.Socket

initialized socket to use instead of creating a new one

Optional socketTimeout

socketTimeout: ms

how many milliseconds of inactivity to allow

Optional subject

subject: undefined | string

The subject of the e-mail

Optional text

text: string | Buffer | Readable | AttachmentLike

The plaintext version of the message

Optional textEncoding

textEncoding: TextEncoding

set explicitly which encoding to use for text parts (quoted-printable or base64). If not set then encoding is detected from text content (mostly ascii means quoted-printable, otherwise base64)

Optional tls

tls: tls.ConnectionOptions

defines additional options to be passed to the socket constructor, e.g. {rejectUnauthorized: true}

Optional to

to: string | Address | Array<string | Address>

Comma separated list or an array of recipients e-mail addresses that will appear on the To: field

Optional transactionLog

transactionLog: undefined | false | true

if set to true, then logs SMTP traffic without message content

Optional url

url: undefined | string

Optional watchHtml

watchHtml: string | Buffer | Readable | AttachmentLike

Apple Watch specific HTML version of the message, same usage as with text and html

Methods

Optional getSocket

  • getSocket(options: Options, callback: function): void
  • Parameters

    • options: Options
    • callback: function
        • (err: Error | null, socketOptions: any): void
        • Parameters

          • err: Error | null
          • socketOptions: any

          Returns void

    Returns void

Optional normalizeHeaderKey

  • normalizeHeaderKey(key: string): string
  • method to normalize header keys for custom caseing

    Parameters

    • key: string

    Returns string

Generated using TypeDoc