setSmtpConfiguration
This procedure sets the SMTP configuration required by the sendMail procedure.
Please note that omitting parameters or specifying a null value/empty string for them will not change the value in the SMTP configuration. All parameters may be omitted or set to null.
Usage
SYSADMIN Procedure
CALL "SYSADMIN.setSmtpConfiguration"(
"hostname" => 'string_hostname',
"port" => integer_port,
"ssl" => boolean_ssl,
"starttls" => boolean_tls,
"username" => 'string_username',
"password" => 'string_password',
"fromAddr" => 'string_fromAddr',
"maxRetries" => integer_maxRetries,
"responseTimeout" => integer_responseTimeout
) ;;
UTILS Procedure
CALL "UTILS.setSmtpConfiguration"(
"hostname" => 'string_hostname',
"port" => integer_port,
"ssl" => boolean_ssl,
"starttls" => boolean_tls,
"username" => 'string_username',
"password" => 'string_password',
"fromAddr" => 'string_fromAddr',
"maxRetries" => integer_maxRetries,
"responseTimeout" => integer_responseTimeout
) ;;
Parameters
Parameter | Description |
|---|---|
| New SMTP server hostname |
| New SMTP server port |
| New SSL setting |
| New TLS setting |
| New SMTP server username |
| New SMTP server unencrypted password. To set an encrypted password, |
| New email address to be used as a "from" address; mandatory |
| Maximum number of retry attempts for sending the email. If |
| Timeout (in seconds) for the SMTP server response. If |
Examples
SYSADMIN Procedure
CALL "SYSADMIN.setSmtpConfiguration"(
"hostname" => 'example_host',
"port" => 12345,
"ssl" => true,
"starttls" => false,
"username" => 'smtp-user',
"password" => 'secret',
"maxRetries" => 2,
"responseTimeout" => 30
) ;;
UTILS Procedure
CALL "UTILS.setSmtpConfiguration"(
"hostname" => 'example_host',
"port" => 12345,
"ssl" => true,
"starttls" => false,
"username" => 'smtp-user',
"password" => 'secret',
"maxRetries" => 2,
"responseTimeout" => 30
) ;;
maxRetries and responseTimeout parameters are available since v25.3