GET SMTP
The GET /SMTP
Short for simple mail transfer protocol, SMTP is a protocol for sending email messages between servers. method is used to retrieve the SMTP configuration profile from Keyfactor Command. This method returns HTTP 200 OK on a success with details about the SMTP profile. Only one profile may be configured. There are no input parameters for this method.
Version 2 of the GET /SMTP method adds support for OAuth and PAM
PAM (Privileged Access Management): Controls privileged access by vaulting credentials, enforcing least-privilege/just-in-time access, rotating secrets, and auditing sessions. Across Keyfactor products, PAM protects diverse sensitive operations and secrets—for example certificate stores and CA credentials—via built-in or third-party providers; external integrations are delivered as custom PAM extensions (several published on Keyfactor’s public GitHub).-based email credentials.
Table 881: GET SMTP Response Data V2
| Name |
Description |
|---|---|
| Host | A string indicating the fully qualified domain name of your SMTP host (e.g.,smtp.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. Common ports are:
|
| RelayAuthenticationType |
An integer indicating the type of authentication used to connect to the mail server. The default is 0 (zero). |
| RelayPassword |
An object indicating the password information to use for authentication along with the RelayUsername if the RelayAuthenticationType is 2 (Basic Authentication). Due to its sensitive nature, this value is not returned in responses. |
| RelayUsername |
An object indicating the username information to use for authentication along with the RelayPassword if the RelayAuthenticationType is 2 (Basic Authentication). |
| SenderAccount |
A string indicating the account used to send email, typically in the form of an email address (e.g., jsmith@keyexample.com).
|
| SenderName |
A string indicating the display name used as the sender of the messages coming from Keyfactor Command. This does not typically need to be a valid value in your mail server. This value is used for all configurations of RelayAuthenticationType. |
| UseSSL | A Boolean indicating that mail should be delivered over TLS/SSL. Not all mail servers support this. |
| ClientId |
An object indicating the client ID to use for authentication along with the ClientSecret if the RelayAuthenticationType is 3 (OAuth Client Credentials). |
| ClientSecret |
An object indicating the client secret to use for authentication along with the ClientId if the RelayAuthenticationType is 3 (OAuth Client Credentials). |
| TokenEndpoint | A string indicating the token endpoint URL for the identity provider, if RelayAuthenticationType is 3 (OAuth Client Credentials). |
| Scope | A string indicating any scopes that should be included in token requests to the identity provider, if RelayAuthenticationType is 3 (OAuth Client Credentials). If multiple scopes are desired, they should be separated by spaces. |
| Audience | A string indicating the audience that should be included in token requests to the identity provider, if RelayAuthenticationType is 3 (OAuth Client Credentials). |
| RequestHeaders |
An array of objects specifying one ore more custom OIDC request headers for the identity provider given as name/value pairs. Parameters configured in this value are added to the headers when Keyfactor Command sends an OIDC request to the OAuth server for the following request types:
|
Table 882: GET SMTP Response Data V2
| Name |
Description |
|---|---|
| Host | A string indicating the fully qualified domain name of your SMTP host (e.g.,smtp.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. Common ports are:
|
| RelayAuthenticationType |
An integer indicating the type of authentication used to connect to the mail server. The default is 0 (zero). |
| RelayPassword |
An object indicating the password information to use for authentication along with the RelayUsername if the RelayAuthenticationType is 2 (Basic Authentication). Due to its sensitive nature, this value is not returned in responses. |
| RelayUsername |
An object indicating the username information to use for authentication along with the RelayPassword if the RelayAuthenticationType is 2 (Basic Authentication). |
| SenderAccount |
A string indicating the account used to send email, typically in the form of an email address (e.g., jsmith@keyexample.com).
|
| SenderName |
A string indicating the display name used as the sender of the messages coming from Keyfactor Command. This does not typically need to be a valid value in your mail server. This value is used for all configurations of RelayAuthenticationType. |
| UseSSL | A Boolean indicating that mail should be delivered over TLS/SSL. Not all mail servers support this. |
| ClientId |
An object indicating the client ID to use for authentication along with the ClientSecret if the RelayAuthenticationType is 3 (OAuth Client Credentials). |
| ClientSecret |
An object indicating the client secret to use for authentication along with the ClientId if the RelayAuthenticationType is 3 (OAuth Client Credentials). |
| TokenEndpoint | A string indicating the token endpoint URL for the identity provider, if RelayAuthenticationType is 3 (OAuth Client Credentials). |
| Scope | A string indicating any scopes that should be included in token requests to the identity provider, if RelayAuthenticationType is 3 (OAuth Client Credentials). If multiple scopes are desired, they should be separated by spaces. |
| Audience | A string indicating the audience that should be included in token requests to the identity provider, if RelayAuthenticationType is 3 (OAuth Client Credentials). |
| RequestHeaders |
An array of objects specifying one ore more custom OIDC request headers for the identity provider given as name/value pairs. Parameters configured in this value are added to the headers when Keyfactor Command sends an OIDC request to the OAuth server for the following request types:
|
Version 1 of the GET /SMTP method includes similar capabilities to version 2, except that it does not support OAuth or PAM.
Table 883: GET SMTP Response Data V1
| 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. Common ports are:
|
| RelayAuthenticationType |
An integer indicating the type of authentication used to connect to the mail server. |
| RelayUsername |
A string indicating the username of the account providing authentication to the mail server if RelayAuthenticationType is set to 2. For Active Directory integrated mail servers, 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. |
| SenderAddress |
A string indicating the sender for email messages delivered from Keyfactor Command, in the form of an email address (e.g., jsmith@keyexample.com). This is considered deprecated and may be removed in a future release. |
| 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. |
Was this page helpful? Provide Feedback