Get mail server settings
get
/api/20210901/system/mail/server
Returns the configuration details of a given mail server. Configuration details include authentication type, security options, host name, port number, and email sender.
Request
There are no request parameters for this operation.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
200 Response
Successful operation.
Root Schema : schema
Type:
object
Mail server used to deliver visualizations and reports to users by email.
Show Source
-
auth(required): object
Discriminator: authType
Discriminator:
{ "propertyName":"authType", "mapping":{ "NO_AUTH":"#/components/schemas/MailServerNoAuth", "USERNAME_PASSWORD_AUTH":"#/components/schemas/MailServerUsernamePasswordAuth", "OAUTH2_AUTH":"#/components/schemas/MailServerOAuth2Auth" } }
Mail server authentication type. -
connectionSecurity(required): object
Discriminator: connectionSecurityType
Discriminator:
{ "propertyName":"connectionSecurityType", "mapping":{ "NO_CONNECTION_SECURITY":"#/components/schemas/NoConnectionSecurity", "SSL_TLS_CONNECTION_SECURITY":"#/components/schemas/SslTlsConnectionSecurity", "START_TLS_CONNECTION_SECURITY":"#/components/schemas/StartTlsConnectionSecurity" } }
Connection security options for the mail server connection. -
host(required): string
Minimum Length:
1
Host name of the SMTP server you want to use to deliver emails. The SMTP server must be accessible from the public internet. -
port(required): integer
Minimum Value:
1
Maximum Value:65535
Port number on the mail server. Common SMTP ports include: 25 (no security), 465 (SSL TLS), 587 (STARTTLS) -
sender(required): object
MailSender
Sender of emails
Nested Schema : Discriminator: authType
Type:
object
Discriminator: authType
Discriminator Values
Mail server authentication type.
Match One Schema
Show Source
-
NO_AUTH -
object
MailServerNoAuth
Mail server doesn???t require authentication.
-
USERNAME_PASSWORD_AUTH -
object
MailServerUsernamePasswordAuth
Mail server authentication requires a username and password.
-
OAUTH2_AUTH -
object
MailServerOAuth2Auth
Mail server authentication uses OAuth2
Nested Schema : Discriminator: connectionSecurityType
Type:
object
Discriminator: connectionSecurityType
Discriminator Values
Connection security options for the mail server connection.
Match One Schema
Show Source
-
NO_CONNECTION_SECURITY -
object
NoConnectionSecurity
No conection security.
-
SSL_TLS_CONNECTION_SECURITY -
object
SslTlsConnectionSecurity
SSL TLS security for the mail server connection.
-
START_TLS_CONNECTION_SECURITY -
object
StartTlsConnectionSecurity
STARTTLS security for the mail server connection.
Nested Schema : MailSender
Type:
object
Sender of emails
Show Source
-
displayName(required): string
Minimum Length:
1
Name displayed in the 'From' field of emails delivering reports. -
emailAddress(required): string
Minimum Length:
1
Email address displayed in the 'From' field of emails delivering reports.
Nested Schema : MailServerNoAuth
Type:
object
Mail server doesn???t require authentication.
Show Source
-
authType(required):
authType
No authentication type
Nested Schema : MailServerUsernamePasswordAuth
Type:
object
Mail server authentication requires a username and password.
Show Source
-
authType(required):
authType
Username and password required for authentication.
-
password(required): string
Minimum Length:
8
Maximum Length:255
Password to authenticate access to the mail server. -
username(required): string
Minimum Length:
1
Username to authenticate access to the mail server.
Nested Schema : MailServerOAuth2Auth
Type:
object
Mail server authentication uses OAuth2
Show Source
-
authType:
authType
OAuth2 AuthType
-
oAuth2Details(required): object
Discriminator: oAuth2Provider
Discriminator:
{ "propertyName":"oAuth2Provider", "mapping":{ "MS_OAUTH2":"#/components/schemas/MailServerMSOAuth2" } }
Configuration details for a specific OAuth2 provider.
Nested Schema : authType
No authentication type
Default Value:
NO_AUTH
Match All
No authentication type
Show Source
-
string
Allowed Values:
[ "NO_AUTH", "USERNAME_PASSWORD_AUTH", "OAUTH2_AUTH" ]
Type of authentication the mail server requires.
Nested Schema : authType
Username and password required for authentication.
Default Value:
USERNAME_PASSWORD_AUTH
Match All
Username and password required for authentication.
Show Source
-
string
Allowed Values:
[ "NO_AUTH", "USERNAME_PASSWORD_AUTH", "OAUTH2_AUTH" ]
Type of authentication the mail server requires.
Nested Schema : authType
OAuth2 AuthType
Default Value:
OAUTH2_AUTH
Match All
OAuth2 AuthType
Show Source
-
string
Allowed Values:
[ "OSS_AUTH_OCI_USER_ID", "OCI_RESOURCE_PRINCIPAL" ]
Type of authentication.
Nested Schema : Discriminator: oAuth2Provider
Type:
object
Discriminator: oAuth2Provider
Discriminator Values
Configuration details for a specific OAuth2 provider.
Match One Schema
Show Source
-
MS_OAUTH2 -
object
MailServerMSOAuth2
Mail server authentication that uses the Microsoft OAuth2 client credential flow.
Nested Schema : MailServerMSOAuth2
Type:
object
Mail server authentication that uses the Microsoft OAuth2 client credential flow.
Show Source
-
clientId(required): string
Minimum Length:
1
Maximum Length:255
OAuth2 client ID required to authenticate access to the mail server. -
oAuth2Provider:
oAuth2Provider
Specific OAuth2 AuthType
-
secret(required): string
Minimum Length:
8
Maximum Length:255
OAuth2 client secret required to authenticate access to the mail server. -
tenant(required): string
Minimum Length:
1
Maximum Length:255
OAuth2 tenant required to authenticate to access the mail server. -
username(required): string
Minimum Length:
1
Username required to authenticate to the mail server. Any valid user with access to the mail server.
Nested Schema : oAuth2Provider
Specific OAuth2 AuthType
Default Value:
MS_OAUTH2
Match All
Specific OAuth2 AuthType
Show Source
-
string
Allowed Values:
[ "MS_OAUTH2" ]
OAuth2 services provider.
Nested Schema : NoConnectionSecurity
Type:
object
No conection security.
Show Source
-
connectionSecurityType(required):
connectionSecurityType
No connection security.
Nested Schema : SslTlsConnectionSecurity
Type:
object
SSL TLS security for the mail server connection.
Show Source
-
connectionSecurityType(required):
connectionSecurityType
SSL TLS connection security.
-
tlsCertificateDetails(required): object
Discriminator: certificateType
Discriminator:
{ "propertyName":"certificateType", "mapping":{ "DEFAULT_TLS_CERTIFICATE":"#/components/schemas/DefaultTlsCertificate", "CUSTOM_TLS_CERTIFICATE":"#/components/schemas/CustomTlsCertificate" } }
Certificate for SSL TLS or START TLS connection security.
Nested Schema : StartTlsConnectionSecurity
Type:
object
STARTTLS security for the mail server connection.
Show Source
-
connectionSecurityType(required):
connectionSecurityType
STARTTLS connection security.
-
tlsCertificateDetails(required): object
Discriminator: certificateType
Discriminator:
{ "propertyName":"certificateType", "mapping":{ "DEFAULT_TLS_CERTIFICATE":"#/components/schemas/DefaultTlsCertificate", "CUSTOM_TLS_CERTIFICATE":"#/components/schemas/CustomTlsCertificate" } }
Certificate for SSL TLS or START TLS connection security.
Nested Schema : connectionSecurityType
No connection security.
Default Value:
NO_CONNECTION_SECURITY
Match All
No connection security.
Show Source
-
string
Allowed Values:
[ "NO_CONNECTION_SECURITY", "SSL_TLS_CONNECTION_SECURITY", "START_TLS_CONNECTION_SECURITY" ]
Type of security on the mail server connection.
Nested Schema : connectionSecurityType
SSL TLS connection security.
Default Value:
SSL_TLS_CONNECTION_SECURITY
Match All
SSL TLS connection security.
Show Source
-
string
Allowed Values:
[ "NO_CONNECTION_SECURITY", "SSL_TLS_CONNECTION_SECURITY", "START_TLS_CONNECTION_SECURITY" ]
Type of security on the mail server connection.
Nested Schema : Discriminator: certificateType
Type:
object
Discriminator: certificateType
Discriminator Values
Certificate for SSL TLS or START TLS connection security.
Match One Schema
Show Source
-
DEFAULT_TLS_CERTIFICATE -
object
DefaultTlsCertificate
Use the default certificate provided for an SSL-enabled mail server.
-
CUSTOM_TLS_CERTIFICATE -
object
CustomTlsCertificate
Use a custom TLS certificate for an SSL-enabled mail server.
Nested Schema : DefaultTlsCertificate
Type:
object
Use the default certificate provided for an SSL-enabled mail server.
Show Source
-
certificateType(required):
certificateType
Use the mail server???s default TLS certificate.
Nested Schema : CustomTlsCertificate
Type:
object
Use a custom TLS certificate for an SSL-enabled mail server.
Show Source
-
certificate(required): string
The certificate for an SSL enabled MailServer
-
certificateType(required):
certificateType
CustomTlsCertificate CertificateType
Nested Schema : certificateType
Use the mail server???s default TLS certificate.
Default Value:
DEFAULT_TLS_CERTIFICATE
Match All
Use the mail server???s default TLS certificate.
Show Source
-
string
Allowed Values:
[ "DEFAULT_TLS_CERTIFICATE", "CUSTOM_TLS_CERTIFICATE" ]
Type of TLS certificate, default or custom.
Nested Schema : certificateType
CustomTlsCertificate CertificateType
Default Value:
CUSTOM_TLS_CERTIFICATE
Match All
CustomTlsCertificate CertificateType
Show Source
-
string
Allowed Values:
[ "DEFAULT_TLS_CERTIFICATE", "CUSTOM_TLS_CERTIFICATE" ]
Type of TLS certificate, default or custom.
Nested Schema : connectionSecurityType
STARTTLS connection security.
Default Value:
START_TLS_CONNECTION_SECURITY
Match All
STARTTLS connection security.
Show Source
-
string
Allowed Values:
[ "NO_CONNECTION_SECURITY", "SSL_TLS_CONNECTION_SECURITY", "START_TLS_CONNECTION_SECURITY" ]
Type of security on the mail server connection.
400 Response
Bad Request (invalid query parameters, malformed headers, and so on).
Root Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
401 Response
Unauthorized (missing or expired credentials, and so on).
Root Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
404 Response
Not Found. The requested resource was not found.
Root Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
Examples
In this example, you request the mail server configuration settings.
cURL Example:
curl -i \ --header 'Authorization: Bearer <token>' \ --request GET 'http://<hostname>/api/20210901/system/mail/server'
Example of Request Body
Not applicable.
Example of Response Body
Status 200:
{ "host": "mail-server.com", "port": 25, "sender": { "displayName": "John Smith", "emailAddress": "john.smith@myorg.com" }, "auth": { "authType": "NO_AUTH" }, "connectionSecurity": { "connectionSecurityType": "NO_CONNECTION_SECURITY" } }