MailAttachment

Represent a mail attachment that can be used in a MailMessage.

Name

Type

Description

contentType

String

set the Content-Type

data

Buffer

set the data

description

String

set the description field to be used in the attachment

disposition

String

set the disposition field to be used in the attachment

name

String

set the name

MailConfig

represents the configuration of a mail service with mail server hostname, port, security options, login options and login/password

Name

Type

Description

allowRcptErrors

Boolean

set if sending allows rcpt errors

authMethods

String

set string of allowed auth methods. if set only these methods will be used if the server supports them. If null or empty all supported methods may be used

hostname

String

Set the hostname of the smtp server.

keepAlive

Boolean

set if connection pool is enabled default is true

if the connection pooling is disabled, the max number of sockets is enforced nevertheless

keyStore

String

get the key store filename to be used when opening SMTP connections

if not set, an options object will be created based on other settings (ssl and trustAll)

keyStorePassword

String

get the key store password to be used when opening SMTP connections

login

LoginOption

Set the login mode for the connection.

Either DISABLED, OPTIONAL or REQUIRED

maxPoolSize

Number (int)

set the max allowed number of open connections to the mail server if not set the default is 10

ownHostname

String

set the hostname to be used for HELO/EHLO and the Message-ID

password

String

Set the password for the login.

port

Number (int)

Set the port of the smtp server.

ssl

Boolean

Set the sslOnConnect mode for the connection.

starttls

StartTLSOptions

Set the tls security mode for the connection.

Either NONE, OPTIONAL or REQUIRED

trustAll

Boolean

set whether to trust all certificates on ssl connect the option is also applied to STARTTLS operation

username

String

Set the username for the login.

MailMessage

represent a mail message that can be sent via the MailClient

Name

Type

Description

attachment

Array of MailAttachment

set the list of attachments of this mail

bcc

Array of String

set list of bcc addresses

bounceAddress

String

set bounce address of this mail

cc

Array of String

set list of cc addresses

fixedHeaders

Boolean

set whether our own headers should be the only headers added to the message

from

String

set from address of this mail

html

String

set the html text of this mail

subject

String

set the subject of this mail

text

String

set the plain text of this mail

to

Array of String

set list of to addresses

MailResult

Represent the result of the sendMail operation

Name

Type

Description

messageID

String

@param messageID the messageID to set

recipients

Array of String

@param recipients the recipients to set