UC_SMTP_MYSERVER - SMTP Variable
This static variable is helpful when you use several SMTP servers as it contains the specifications for the email connection of one specific server to the Automation Engine. You must define it to be able to use the new MYSERVER parameter in the SEND_MAIL script function. For each variable you create, ensure that you replace the MYSERVER part in its name with the server name you define in SEND_MAIL (UC_SMTP_LOCALHOST, for example).
Important! The SMTP_SERVER and SMTP_FROM_ADDR keys are mandatory. All other settings are optional.
This variable covers the following SMTP parameters:
SMTP_FROM_ADDR
-
Description: Email address of the sender.
-
Restart required: No
SMTP_LOGIN
-
Description: (Optional) Name of the Login object that is used to log on to the SMTP server.
-
Restart required: No
SMTP_MAX_ATTACHMENT_SIZE
-
Description: (Optional) Maximum size in bytes of the report file that is sent by email. This applies only to reports that are sent by email, but not to other types of attachments.
In the Notification page of a Notification object, specify the RunID of the relevant task so that the corresponding reports can be attached to the message. For more information, see Notification (CALL).
-
Allowed values: 400 - 50000
When the report file exceeds the maximum value, only the allowed size is read and sent. The file end includes the following note: Truncated through SMTP_MAX_ATTACHMENT_SIZE limit.
-
Default value: 8000
-
Restart required: No
SMTP_PORT
-
Description: (Optional) Port of the SMTP server used to connect to the mail server.
A port that supports TLS might be required when STARTTLS or TLS are set as the SMTP_PROTOCOL.
-
Default value: SMTP servers commonly use the Transmission Control Protocol on port number 25 for plaintext and 587 for encrypted communications. Depending on how the mail server to be contacted is configured, you can define any port.
Important! Definitions made in a UC_SMTP_MYSERVER variable overrule the definitions made in the UC_CLIENT_SETTINGS variable.
-
Restart required: No
SMTP_PROTOCOL
-
Description: (Optional) The protocol that you want to use to establish the communication.
-
Allowed values: upper case, lower case, and mixed case letters
-
PLAIN (default)
Sends emails in plain text through an unencrypted connection.
-
STARTTLS
Sends emails through an opportunistic TLS connection which refers to extensions in plain text communication protocols, which offer a way to upgrade a plain text connection to an encrypted (TLS or SSL) connection instead of using a separate port for encrypted communication. Depending on how your SMTP server is configured, you might also need to change SMTP_PORT to change its default behavior.
Additional actions that are required in this case:
-
Upload the certificate of the SMTP server to the UC_TRUSTEDCERTS Storage object in client 0. The first column in this Storage object must contain a name that you can choose, and the second column must contain the certificate file.
-
Set SMTPS_CERT in the SMTP settings to the name you have chosen to reference the correct certificate file from UC_TRUSTEDCERTS.
-
-
TLS
Sends emails through a forced TLS connection. A port that supports TLS only is required in this case.In addition, follow the steps mentioned in the STARTTLS section above.
Important!
-
Changing the SMTP_PROTOCOL key affects the SEND_MAIL script function and the Notification (CALL) object, which includes the option to define MAIL Notifications templates for sending emails. Emails you send through one of these two ways are encrypted or not, depending on what you define here in the SMTP_PROTOCOL key. For more information, see also SEND_MAIL and MAIL Notifications
-
This parameter is only available when the SEND_MAIL script function or the Notification (CALL) object, are executed on the Automation Engine.
-
If you use STARTTLS or TLS, you must enter the name of the certificate you want to use for authentication in the SMTPS_CERT key.
-
Contact your administrator if you need to know whether you should use STARTTLS or TLS.
-
-
Restart required: No
SMTP_REPLY_TO
-
Description: (Optional) Email address for the response.
-
Restart required: No
SMTP_SERVER
-
Description: Host name of the SMTP server.
-
Restart required: No
SMTP_TIMEOUT
-
Description: (Optional) Maximum time in seconds that the system waits for an SMTP Server to respond.
-
Allowed values: 0 - 999
-
Default value: 20
-
Restart required: No
SMTPS_CERT
- Description: (Optional) Name of the certificate stored in the UC_TRUSTEDCERTS Storage object in Client 0.
-
This parameter is mandatory if you set the parameters STARTTLS or TLS in the SMTP_PROTOCOL key. The UC_TRUSTEDCERTS Storage object is delivered with Client 0 and allows you to upload the relevant certificate files. For details, see UC_TRUSTEDCERTS Storage Object
- This parameter is only available when the SEND_MAIL script function or the Notification (CALL) object, which includes the option to define MAIL Notification templates for sending emails, is executed on the Automation Engine.
-
Behavior of agents:
Only the Automation Engine and Java-based OS agents support user-defined Vara objects containing SMTP settings to override the SMTP settings set in UC_CLIENT_SETTINGS (UC_SMTP_MYSERVER); they also support the settings SMTP_PORT, SMTP_PROTOCOL, SMTPS_CERT. TLS is also supported. Other Agents ignore the mentioned SMTP(S) settings. Even if you configure SMTP_PORT, SMTP_PROTOCOL, or SMTPS_CERT, emails are sent from them using the default behavior of using SMTP_SERVER but with an unencrypted connection and through the default port 25. This behavior serves to maintain backward compatibility towards agents that support SMTP and will probably not receive any SMTP-related changes in the future.
-
Restart required: No
Important!
See also: