new SmtpConnection()
Extends
Methods
authenticate(username, password)
Set the username and password
Name | Type | Description |
---|---|---|
username | string | |
password | string |
- Since
- 4.0.3
- Inherited From
authenticateFromEncrypedAccount(encryptedAccount)
Set the username and password from a volume encrypted authenication string
Name | Type | Description |
---|---|---|
encryptedAccount | string | Encrypted account (Base64 encoded string generated in the Admin-Tool) |
- Since
- 5.2.1
- Inherited From
send(message, asyncopt)
Sends the mail message.
Name | Type | Attributes | Description |
---|---|---|---|
message | $k.MailMessage | The mail message to send. | |
async | boolean | <optional> | True if the mail should be sent asynchronously, false if send() should block until the mail has been sent. Default is true. |
- Since
- 5.5.1
setDefaultConfiguration()
Set configuration values from the SMTP settings of the Knowledge Graph.
- Since
- 5.5.1
setHost(host, portopt)
Set the hostname and port of the SMTP server.
Name | Type | Attributes | Description |
---|---|---|---|
host | string | ||
port | number | <optional> |
- Since
- 5.5.1
setRetries(retries)
Set the number of retries when trying to contact the SMTP server.
Name | Type | Description |
---|---|---|
retries | number | Number of retries |
- Since
- 5.5.1
setRetryDelay(retryDelay)
Set the delay between trying to contact the SMTP server. Only used when retries is a non-zero value.
Name | Type | Description |
---|---|---|
retryDelay | number | Delay in seconds |
- Since
- 5.5.1
setTimeout(timeout)
Set the timeout in milliseconds for connection to wait for reponses
Name | Type | Description |
---|---|---|
timeout | number | number of milliseconds to wait for reponses, default 20000 |
- Since
- 4.2.0
- Inherited From
setUserName(username)
Set the name of the user account. The password must be configured in the SMTP settings of the Knowledge Graph.
Name | Type | Description |
---|---|---|
username | string |
- Since
- 5.5.1
useSMTPS()
Use SMTPS for connecting to the SMTP server.
- Since
- 5.5.1
useStartTLS()
Use STARTTLS for connecting to the SMTP server.
- Since
- 5.5.1
useUnsecureConnection()
Use an unsecure connection to the SMTP server. This is the default connection type.
- Since
- 5.5.1