= Cheatsheets

[[DKIMSignOptions]]
== DKIMSignOptions

++++

This represents the options used to perform DKIM Signature signing action.

See: https://tools.ietf.org/html/rfc6376
++++
'''

[cols=">25%,25%,50%"]
[frame="topbot"]
|===
^|Name | Type ^| Description
|[[auid]]`@auid`|`String`|+++
Sets the Agent or User Identifier(AUID)
+++
|[[bodyCanonAlgo]]`@bodyCanonAlgo`|`link:enums.html#CanonicalizationAlgorithm[CanonicalizationAlgorithm]`|+++
Sets the canonicalization algorithm for mail body.
+++
|[[bodyLimit]]`@bodyLimit`|`Number (int)`|+++
Sets the body limit to sign.
+++
|[[copiedHeaders]]`@copiedHeaders`|`Array of String`|+++
Sets the copied headers used in DKIM.
+++
|[[expireTime]]`@expireTime`|`Number (long)`|+++
Sets the expire time in seconds when the signature sign will be expired.

Success call of this method indicates that the signature sign timestamp is enabled.
+++
|[[headerCanonAlgo]]`@headerCanonAlgo`|`link:enums.html#CanonicalizationAlgorithm[CanonicalizationAlgorithm]`|+++
Sets the canonicalization algorithm for signed headers.
+++
|[[privateKey]]`@privateKey`|`String`|+++
Sets the PKCS#8 format private key used to sign the email.
+++
|[[privateKeyPath]]`@privateKeyPath`|`String`|+++
Sets the PKCS#8 format private key file path.
+++
|[[sdid]]`@sdid`|`String`|+++
Sets the Singing Domain Identifier(SDID).
+++
|[[selector]]`@selector`|`String`|+++
Sets the selector used to query the public key.
+++
|[[signAlgo]]`@signAlgo`|`link:enums.html#DKIMSignAlgorithm[DKIMSignAlgorithm]`|+++
Sets the signing algorithm.
+++
|[[signatureTimestamp]]`@signatureTimestamp`|`Boolean`|+++
Sets to enable or disable signature sign timestmap. Default is disabled.
+++
|[[signedHeaders]]`@signedHeaders`|`Array of String`|+++
Sets the email signedHeaders used to sign.
+++
|===

[[MailConfig]]
== MailConfig

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

[cols=">25%,25%,50%"]
[frame="topbot"]
|===
^|Name | Type ^| Description
|[[allowRcptErrors]]`@allowRcptErrors`|`Boolean`|+++
set if sending allows rcpt errors
<p>
if true, the mail will be sent to the recipients that the server accepted, if any
<p>
+++
|[[authMethods]]`@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
+++
|[[connectTimeout]]`@connectTimeout`|`Number (int)`|-
|[[crlPaths]]`@crlPaths`|`Array of String`|-
|[[crlValues]]`@crlValues`|`Array of Buffer`|-
|[[disableEsmtp]]`@disableEsmtp`|`Boolean`|+++
set if ESMTP should be tried as first command (EHLO)
<p>
rfc 1869 states that clients should always attempt EHLO as first command to determine if ESMTP
is supported, if this returns an error code, HELO is tried to use old SMTP.
If there is a server that does not support EHLO and does not give an error code back, the connection
should be closed and retried with HELO. We do not do that and rather support turning off ESMTP with a
setting. The odds of this actually happening are very small since the client will not connect to arbitrary
smtp hosts on the internet. Since the client knows that is connects to a host that doesn't support ESMTP/EHLO
in that way, the property has to be set to false.
<p>
+++
|[[enableDKIM]]`@enableDKIM`|`Boolean`|+++
Sets true to enable DKIM Signatures, sets false to disable it.

<p>
    This is used most for temporary disable DKIM without removing DKIM opations from current config.
</p>
+++
|[[enabledCipherSuites]]`@enabledCipherSuites`|`Array of String`|-
|[[enabledSecureTransportProtocols]]`@enabledSecureTransportProtocols`|`Array of String`|-
|[[hostname]]`@hostname`|`String`|+++
Set the hostname of the smtp server.
+++
|[[hostnameVerificationAlgorithm]]`@hostnameVerificationAlgorithm`|`String`|-
|[[idleTimeout]]`@idleTimeout`|`Number (int)`|-
|[[idleTimeoutUnit]]`@idleTimeoutUnit`|`link:enums.html#TimeUnit[TimeUnit]`|-
|[[keepAlive]]`@keepAlive`|`Boolean`|+++
set if connection pool is enabled
default is true
<p>
if the connection pooling is disabled, the max number of sockets is enforced nevertheless
<p>
+++
|[[keyStore]]`@keyStore`|`String`|+++
get the key store filename to be used when opening SMTP connections
<p>
if not set, an options object will be created based on other settings (ssl
and trustAll)
+++
|[[keyStorePassword]]`@keyStorePassword`|`String`|+++
get the key store password to be used when opening SMTP connections
+++
|[[localAddress]]`@localAddress`|`String`|-
|[[logActivity]]`@logActivity`|`Boolean`|-
|[[login]]`@login`|`link:enums.html#LoginOption[LoginOption]`|+++
Set the login mode for the connection.
<p>
Either DISABLED, OPTIONAL or REQUIRED
+++
|[[maxPoolSize]]`@maxPoolSize`|`Number (int)`|+++
set the max allowed number of open connections to the mail server
if not set the default is 10
+++
|[[metricsName]]`@metricsName`|`String`|-
|[[ownHostname]]`@ownHostname`|`String`|+++
set the hostname to be used for HELO/EHLO and the Message-ID
+++
|[[password]]`@password`|`String`|+++
Set the password for the login.
+++
|[[pipelining]]`@pipelining`|`Boolean`|+++
Sets to enable/disable the pipelining capability if SMTP server supports it.
+++
|[[port]]`@port`|`Number (int)`|+++
Set the port of the smtp server.
+++
|[[receiveBufferSize]]`@receiveBufferSize`|`Number (int)`|-
|[[reconnectAttempts]]`@reconnectAttempts`|`Number (int)`|-
|[[reconnectInterval]]`@reconnectInterval`|`Number (long)`|-
|[[reuseAddress]]`@reuseAddress`|`Boolean`|-
|[[reusePort]]`@reusePort`|`Boolean`|-
|[[sendBufferSize]]`@sendBufferSize`|`Number (int)`|-
|[[soLinger]]`@soLinger`|`Number (int)`|-
|[[ssl]]`@ssl`|`Boolean`|-
|[[sslHandshakeTimeout]]`@sslHandshakeTimeout`|`Number (long)`|-
|[[sslHandshakeTimeoutUnit]]`@sslHandshakeTimeoutUnit`|`link:enums.html#TimeUnit[TimeUnit]`|-
|[[starttls]]`@starttls`|`link:enums.html#StartTLSOptions[StartTLSOptions]`|+++
Set the tls security mode for the connection.
<p>
Either NONE, OPTIONAL or REQUIRED
+++
|[[tcpCork]]`@tcpCork`|`Boolean`|-
|[[tcpFastOpen]]`@tcpFastOpen`|`Boolean`|-
|[[tcpKeepAlive]]`@tcpKeepAlive`|`Boolean`|-
|[[tcpNoDelay]]`@tcpNoDelay`|`Boolean`|-
|[[tcpQuickAck]]`@tcpQuickAck`|`Boolean`|-
|[[trafficClass]]`@trafficClass`|`Number (int)`|-
|[[trustAll]]`@trustAll`|`Boolean`|-
|[[useAlpn]]`@useAlpn`|`Boolean`|-
|[[userAgent]]`@userAgent`|`String`|+++
Sets the Mail User Agent(MUA) name.

<p>
It is used to generate the boundary in case of MultiPart email and the Message-ID.

If <code>null</code> is set, DEFAULT_USER_AGENT is used.
</p>
+++
|[[username]]`@username`|`String`|+++
Set the username for the login.
+++
|===

[[MailMessage]]
== MailMessage

++++
represent a mail message that can be sent via the MailClient
++++
'''

[cols=">25%,25%,50%"]
[frame="topbot"]
|===
^|Name | Type ^| Description
|[[bcc]]`@bcc`|`Array of String`|+++
set list of bcc addresses
+++
|[[bounceAddress]]`@bounceAddress`|`String`|+++
set bounce address of this mail
+++
|[[cc]]`@cc`|`Array of String`|+++
set list of cc addresses
+++
|[[fixedHeaders]]`@fixedHeaders`|`Boolean`|+++
set whether our own headers should be the only headers added to the message
+++
|[[from]]`@from`|`String`|+++
set from address of this mail
+++
|[[headers]]`@headers`|`String`|+++
Add a message header.
+++
|[[html]]`@html`|`String`|+++
set the html text of this mail
+++
|[[subject]]`@subject`|`String`|+++
set the subject of this mail
+++
|[[text]]`@text`|`String`|+++
set the plain text of this mail
+++
|[[to]]`@to`|`Array of String`|+++
set list of to addresses
+++
|===

[[MailResult]]
== MailResult

++++
Represent the result of the sendMail operation
++++
'''

[cols=">25%,25%,50%"]
[frame="topbot"]
|===
^|Name | Type ^| Description
|[[messageID]]`@messageID`|`String`|+++

+++
|[[recipients]]`@recipients`|`Array of String`|+++

+++
|===