Skip to main content

Mailer

Interfaces

Address

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:30

Properties

address
address: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:32

name
name: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:31


AmpAttachment

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:61

Extends

Properties

content?
optional content: string | Buffer<ArrayBufferLike> | Readable;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:37

String, Buffer or a Stream contents for the attachment

Inherited from

AttachmentLike.content

contentType?
optional contentType: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:67

optional content type for the attachment, if not set will be derived from the filename property

encoding?
optional encoding: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:65

defines optional content encoding, eg. ‘base64’ or ‘hex’. This only applies if the content is a string. By default an unicode string is assumed.

href?
optional href: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:63

is an alternative for content to load the AMP4EMAIL data from an URL

path?
optional path: string | Url;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:39

path to a file or an URL (data uris are allowed as well) if you want to stream the file instead of including it (better for larger attachments)

Inherited from

AttachmentLike.path

raw?
optional raw: 
| string
| Buffer<ArrayBufferLike>
| Readable
| AttachmentLike;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:69

an optional value that overrides entire node content in the mime message. If used then all other options set for this node are ignored.


Attachment

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:42

Extends

Properties

cid?
optional cid: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:46

optional content id for using inline images in HTML message source. Using cid sets the default contentDisposition to 'inline' and moves the attachment into a multipart/related mime node, so use it only if you actually want to use this attachment as an embedded image

content?
optional content: string | Buffer<ArrayBufferLike> | Readable;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:37

String, Buffer or a Stream contents for the attachment

Inherited from

AttachmentLike.content

contentDisposition?
optional contentDisposition: "attachment" | "inline";

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:54

optional content disposition type for the attachment, defaults to ‘attachment’

contentTransferEncoding?
optional contentTransferEncoding: false | "quoted-printable" | "base64" | "7bit";

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:52

optional transfer encoding for the attachment, if not set it will be derived from the contentType property. Example values: quoted-printable, base64. If it is unset then base64 encoding is used for the attachment. If it is set to false then previous default applies (base64 for most, 7bit for text).

contentType?
optional contentType: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:50

optional content type for the attachment, if not set will be derived from the filename property

encoding?
optional encoding: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:48

If set and content is string, then encodes the content to a Buffer using the specified encoding. Example values: base64, hex, binary etc. Useful if you want to use binary attachments in a JSON formatted e-mail object

filename?
optional filename: string | false;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:44

filename to be reported as the name of the attached file, use of unicode is allowed. If you do not want to use a filename, set this value as false, otherwise a filename is generated automatically

headers?
optional headers: Headers;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:56

is an object of additional headers

path?
optional path: string | Url;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:39

path to a file or an URL (data uris are allowed as well) if you want to stream the file instead of including it (better for larger attachments)

Inherited from

AttachmentLike.path

raw?
optional raw: 
| string
| Buffer<ArrayBufferLike>
| Readable
| AttachmentLike;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:58

an optional value that overrides entire node content in the mime message. If used then all other options set for this node are ignored.


AttachmentLike

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:35

Extended by

Properties

content?
optional content: string | Buffer<ArrayBufferLike> | Readable;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:37

String, Buffer or a Stream contents for the attachment

path?
optional path: string | Url;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:39

path to a file or an URL (data uris are allowed as well) if you want to stream the file instead of including it (better for larger attachments)


Connection

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:83

Properties

connection
connection: Socket;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:84


Envelope

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:87

Properties

bcc?
optional bcc: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:95

addresses from this value get added to RCPT TO list

cc?
optional cc: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:93

addresses from this value get added to RCPT TO list

from?
optional from: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:89

the first address gets used as MAIL FROM address in SMTP

to?
optional to: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:91

addresses from this value get added to RCPT TO list


IcalAttachment

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:72

Extends

Properties

content?
optional content: string | Buffer<ArrayBufferLike> | Readable;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:37

String, Buffer or a Stream contents for the attachment

Inherited from

AttachmentLike.content

encoding?
optional encoding: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:80

defines optional content encoding, eg. ‘base64’ or ‘hex’. This only applies if the content is a string. By default an unicode string is assumed.

filename?
optional filename: string | false;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:76

optional filename, defaults to ‘invite.ics’

href?
optional href: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:78

is an alternative for content to load the calendar data from an URL

method?
optional method: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:74

optional method, case insensitive, defaults to ‘publish’. Other possible values would be ‘request’, ‘reply’, ‘cancel’ or any other valid calendar method listed in RFC5546. This should match the METHOD: value in calendar event file.

path?
optional path: string | Url;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:39

path to a file or an URL (data uris are allowed as well) if you want to stream the file instead of including it (better for larger attachments)

Inherited from

AttachmentLike.path


ListHeaders

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:24

Indexable

[key: string]: 
| ListHeader
| ListHeader[]
| ListHeader[][]

Options

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:98

Properties

alternatives?
optional alternatives: Attachment[];

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:134

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

amp?
optional amp: 
| string
| Buffer<ArrayBufferLike>
| Readable
| AmpAttachment;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:124

AMP4EMAIL specific HTML version of the message, same usage as with text and html. Make sure it is a full and valid AMP4EMAIL document, otherwise the displaying email client falls back to html and ignores the amp part

attachDataUrls?
optional attachDataUrls: boolean;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:157

if set to true then converts data:images in the HTML content of message to embedded attachments

attachments?
optional attachments: Attachment[];

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:132

An array of attachment objects

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

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:108

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

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

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:106

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

date?
optional date: string | Date;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:140

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

disableFileAccess?
optional disableFileAccess: boolean;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:150

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

disableUrlAccess?
optional disableUrlAccess: boolean;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:148

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

dkim?
optional dkim: Options;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:152

is an object with DKIM options

encoding?
optional encoding: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:142

optional transfer encoding for the textual parts

envelope?
optional envelope: Envelope | Envelope;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:136

optional SMTP envelope, if auto generated envelope is not suitable

from?
optional from: string | Address;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:100

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

headers?
optional headers: Headers;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:128

An object or array of additional header fields

html?
optional html: 
| string
| Buffer<ArrayBufferLike>
| Readable
| AttachmentLike;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:120

The HTML version of the message

icalEvent?
optional icalEvent: 
| string
| Buffer<ArrayBufferLike>
| Readable
| IcalAttachment;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:126

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

inReplyTo?
optional inReplyTo: string | Address;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:112

The message-id this message is replying

list?
optional list: ListHeaders;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:130

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

messageId?
optional messageId: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:138

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

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

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:155

raw?
optional raw: 
| string
| Buffer<ArrayBufferLike>
| Readable
| AttachmentLike;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:144

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

references?
optional references: string | string[];

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:114

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

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

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:110

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

sender?
optional sender: string | Address;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:102

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

subject?
optional subject: string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:116

The subject of the e-mail

text?
optional text: 
| string
| Buffer<ArrayBufferLike>
| Readable
| AttachmentLike;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:118

The plaintext version of the message

textEncoding?
optional textEncoding: TextEncoding;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:146

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)

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

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:104

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

watchHtml?
optional watchHtml: 
| string
| Buffer<ArrayBufferLike>
| Readable
| AttachmentLike;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:122

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

xMailer?
optional xMailer: string | false;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:161

if set to false then removes x-mailer header, otherwise replaces the default x-mailer header value

Methods

normalizeHeaderKey()?
optional normalizeHeaderKey(key): string;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:154

method to normalize header keys for custom caseing

Parameters
ParameterType
keystring
Returns

string

Type Aliases

Headers

type Headers = 
| {
[key: string]:
| string
| string[]
| {
prepared: boolean;
value: string;
};
}
| {
key: string;
value: string;
}[];

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:18


ListHeader

type ListHeader = 
| string
| {
comment: string;
url: string;
};

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:22


PluginFunction()

type PluginFunction<T> = (mail, callback) => void;

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:164

Type Parameters

Type Parameter
T

Parameters

ParameterType
mailMailMessage<T>
callback(err?) => void

Returns

void


TextEncoding

type TextEncoding = "quoted-printable" | "base64";

Defined in: node_modules/.pnpm/@types+nodemailer@6.4.21/node_modules/@types/nodemailer/lib/mailer/index.d.ts:28