PUT SMTP

The PUT /SMTPClosed Short for simple mail transfer protocol, SMTP is a protocol for sending email messages between servers. method is used to update the SMTP configuration profile information. This method returns HTTP 200 OK on a success with details about the SMTP configuration profile.

Tip:  The following permissions (see Security Overview) are required to use this feature:

SystemSettings: Modify

Important:  Any previously populated fields that are not submitted with their full existing data using this method will be cleared of their existing data. When using this method, you should first do a GET to retrieve all the values for the record you want to update, enter corrected data into the field(s) you want to update, and then submit all the fields using PUT, including the fields that contain values but which you are not changing.

Table 573: PUT SMTP Input Parameters

Name In Description
Host Body Required. A string indicating the fully qualified domain name of your SMTP host (e.g. corpexch02.keyexample.com).
Id Body Required. An integer indicating the Keyfactor Command reference ID of the SMTP record. This will be 1 in most environments.
Port Body An integer indicating the SMTP port (e.g. 25).
RelayAuthenticationType Body

An integer indicating the type of authentication used to connect to the mail server. ClosedShow authentication details.

RelayPassword Body

Required*. A string indicating the password of the user specified by RelayUsername if RelayAuthenticationType is set to 2. This field is required if RelayAuthenticationType is set to 2.

No data is output in this field on a GET.

RelayUsername Body

Required*. A string indicating the username of the account providing authentication to the mail server if RelayAuthenticationType is set to 2. The username should be provided in DOMAIN\\username format. This field is required if RelayAuthenticationType is set to 2.

For most mail server configurations, the username provided must have as a valid email address the email address you set in the SenderAccount parameter.

SenderAccount Body

Required. A string indicating the sender for email messages delivered from Keyfactor Command, in the form of an email address (e.g. jsmith@keyexample.com). Depending on the email configuration in your environment, the sender account may need to be a valid user on your mail server or you may be able to put anything in this field.

SenderName Body

Required. A string indicating the name that appears as the “from” in the user's mail client (e.g. Keyfactor Command). This value is used for both configurations of RelayAuthenticationType.

UseSSL Body A Boolean indicating that mail should be delivered over TLS/SSL. Not all mail servers support this.

Table 574: POST SMTP Test Response Data

Name Description
Host A string indicating the fully qualified domain name of your SMTP host (e.g. corpexch02.keyexample.com).
Id An integer indicating the Keyfactor Command reference ID of the SMTP record. This will be 1 in most environments.
Port An integer indicating the SMTP port (e.g. 25).
RelayAuthenticationType

An integer indicating the type of authentication used to connect to the mail server. ClosedShow authentication details.

RelayUsername

A string indicating the username of the account providing authentication to the mail server if RelayAuthenticationType is set to 2. The username should be provided in DOMAIN\\username format.

For most mail server configurations, the username provided must have as a valid email address the email address you set in the SenderAccount parameter.

SenderAccount

A string indicating the sender for email messages delivered from Keyfactor Command, in the form of an email address (e.g. jsmith@keyexample.com). Depending on the email configuration in your environment, the sender account may need to be a valid user on your mail server or you may be able to put anything in this field.

SenderName

A string indicating the name that appears as the “from” in the user's mail client (e.g. Keyfactor Command). This value is used for both configurations of RelayAuthenticationType.

UseSSL A Boolean indicating that mail should be delivered over TLS/SSL. Not all mail servers support this.
Tip:  For code examples, see the Keyfactor API Endpoint Utility. To find the embedded web copy of this utility, click the help icon () at the top of the Keyfactor Command Management Portal page next to the Log Out button.