- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarSettings/legacyTestEmailSettings#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarSettings/legacyTestEmailSettings#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarSettings/legacyTestEmailSettings#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarSettings/legacyTestEmailSettings#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarSettings/legacyTestEmailSettings#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarSettings/legacyTestEmailSettings#body.LegacyTestEmailSettingsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarSettings/legacyTestEmailSettings#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarSettings/legacyTestEmailSettings#body.aspect_1)

**Full name**: projects.locations.instances.legacySoarSettings.legacyTestEmailSettings

Tests the configured email settings by attempting to connect to the SMTP server and send a test message. This validates the platform's ability to send email notifications and reports.

### HTTP request

`POST https://{endpoint}/v1alpha/{instance}/legacySoarSettings:legacyTestEmailSettings`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/chronicle/docs/reference/rest#rest_endpoints).

### Path parameters

| Parameters ||
|---|---|
| `instance` | `string` Required. The instance to get the test email settings for. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "senderDisplayName": string, "senderEmailAddress": string, "username": string, "password": string, "smtpServerAddress": string, "mailServerProvider": string, "azureClientId": string, "azureTenantId": string, "siemplifySmtp": boolean, "isRequireAuthentication": boolean, "smtpPort": integer, "useOauthToken": boolean, "useSsl": boolean, "trustCertificate": boolean } ``` |

| Fields ||
|---|---|
| `senderDisplayName` | `string` Optional. The sender display name. |
| `senderEmailAddress` | `string` Required. The sender email address. |
| `username` | `string` Optional. The username. |
| `password` | `string` Optional. The password. |
| `smtpServerAddress` | `string` Required. The smtp server address. |
| `mailServerProvider` | `string` Optional. The mail server provider. |
| `azureClientId` | `string` Optional. The azure client id. |
| `azureTenantId` | `string` Optional. The azure tenant id. |
| `siemplifySmtp` | `boolean` Optional. Whether siemplify smtp is enabled. |
| `isRequireAuthentication` | `boolean` Optional. Whether authentication is required. |
| `smtpPort` | `integer` Optional. The smtp port. |
| `useOauthToken` | `boolean` Optional. Whether to use oauth token. |
| `useSsl` | `boolean` Optional. Whether to use ssl. |
| `trustCertificate` | `boolean` Optional. Whether to trust certificate. |

### Response body

Response message for LegacySoarSettingService.LegacyTestEmailSettings.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "errorMessage": string, "isSuccessful": boolean } ``` |

| Fields ||
|---|---|
| `errorMessage` | `string` Output only. The error message. |
| `isSuccessful` | `boolean` Output only. Whether the email was successful. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/chronicle`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `instance` resource:

- `chronicle.legacySoarSettings.get`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).