= Cheatsheets

[[MailAttachment]]
== MailAttachment

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

[cols=">25%,^25%,50%"]
[frame="topbot"]
|===
^|Name | Type ^| Description
|[[contentType]]`contentType`|`String`|
+++
set the Content-Type
+++
|[[data]]`data`|`Buffer`|
+++
set the data
+++
|[[description]]`description`|`String`|
+++
set the description field to be used in the attachment
+++
|[[disposition]]`disposition`|`String`|
+++
set the disposition field to be used in the attachment
+++
|[[name]]`name`|`String`|
+++
set the name
+++
|===

[[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
+++
|[[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
+++
|[[hostname]]`hostname`|`String`|
+++
Set the hostname of the smtp server.
+++
|[[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
+++
|[[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
+++
|[[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.
+++
|[[port]]`port`|`Number (int)`|
+++
Set the port of the smtp server.
+++
|[[ssl]]`ssl`|`Boolean`|
+++
Set the sslOnConnect mode for the connection.
+++
|[[starttls]]`starttls`|`link:enums.html#StartTLSOptions[StartTLSOptions]`|
+++
Set the tls security mode for the connection.
 <p>
 Either NONE, OPTIONAL or REQUIRED
+++
|[[trustAll]]`trustAll`|`Boolean`|
+++
set whether to trust all certificates on ssl connect the option is also
 applied to STARTTLS operation
+++
|[[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
|[[attachment]]`attachment`|`link:dataobjects.html#MailAttachment[MailAttachment]`|
+++
set a single attachment of this mail the result of getAttachment when using
 this method returns an unmodifiable list, if you want to be able to add
 attachments later, please use
 <code>setAttachment(new ArrayList<MailAttachment>())</code> instead
+++
|[[bcc]]`bcc`|`String`|
+++
helper method for single recipient
+++
|[[bounceAddress]]`bounceAddress`|`String`|
+++
set bounce address of this mail
+++
|[[cc]]`cc`|`String`|
+++
helper method for single recipient
+++
|[[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
+++
|[[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`|`String`|
+++
helper method for single recipient
+++
|===

[[MailResult]]
== MailResult

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

[cols=">25%,^25%,50%"]
[frame="topbot"]
|===
^|Name | Type ^| Description
|[[messageID]]`messageID`|`String`|
+++
@param messageID the messageID to set
+++
|[[recipients]]`recipients`|`Array of String`|
+++
@param recipients the recipients to set
+++
|===

