Send Email
LAST UPDATED: JAN 7, 2025
Sends out a system email.
Implementation | System |
Command Category | System Utility |
Tags | COMMUNICATION EMAIL |
Inputs
Parameter Name | Required/Optional | Description | Sample Data |
---|---|---|---|
To Addresses | Required | Recipient email addresses, separated by commas. | user01@example.com, user02@example.com |
Subject | Optional | The email subject line. | This is a test email |
Email Body | Optional | The main content of the email. |
HTML
|
Reply Mode | Optional | The setting that specifies whether the email requires a response or approval. Require Reply: Requires a recipient to submit a reply before the task can proceed. Require All Reply: Requires all recipients to submit a reply before the task can proceed. Require Approval: Requires the recipient to approve or deny a request before the task can proceed. Require All Approval: Requires that all recipients must approve or deny a request before the task can proceed. First to Approve / Reject: Allows the command task to proceed as soon as the first response, either an approval or a rejection, is submitted. | Require Approval |
Reply Due Time | Optional | The time duration, in minutes, allocated for awaiting a reply. | 100 |
CC | Optional | Additional recipients, separated by comma, who will receive a copy of the email. All recipients, including those in the To and CC fields, can see each other's email addresses. | demo@d3security.com |
BCC | Optional | Additional recipients, separated by commas, who will receive a copy of the email with their addresses hidden from others. BCC recipients can see addresses in the To field but not those in the CC field or other BCC recipients. | demo@d3security.com |
File Source | Optional | The source of the file to send. Available options are:
| Playbook File |
File Id | Optional | The identifier used to specify the exact file. | 183 |
Output
Remote Command API
The D3 command API allows you to send requests to D3 SOAR to execute this utility command via REST API.
Request
POST
https:/{base_url}/{api_namespace}/api/Command/SendEmail
Headers
Please refer to the page Webhook Configuration Guide - Authentication Method: API Keys for more details.
Request Body
{
"Username": "<Username here>",
"Site": "<Site here>",
"CommandParams": {
"To Addresses": "<To Addresses here>",
"Subject": "<Subject here>",
"Email Body": "<Email Body here>",
"Reply Mode": "<Reply Mode here>",
"Reply Due Time": "<Reply Due Time here>",
"CC": "<CC here>",
"BCC": "<BCC here>",
"File Source": "<File Source here>",
"File Id": "<File Id here>"
}
}
Body Parameters
Parameter Name | Type | Required/Optional | Description |
---|---|---|---|
Username |
| Required | The username of your D3 SOAR account. |
Site |
| Required | The D3 SOAR site to run the remote command. |
To Addresses |
| Required | Recipient email addresses, separated by commas. |
Subject |
| Optional | The email subject line. |
Email Body |
| Optional | The main content of the email. |
Reply Mode |
| Optional | The setting that specifies whether the email requires a response or approval. Require Reply: Requires a recipient to submit a reply before the task can proceed. Require All Reply: Requires all recipients to submit a reply before the task can proceed. Require Approval: Requires the recipient to approve or deny a request before the task can proceed. Require All Approval: Requires that all recipients must approve or deny a request before the task can proceed. First to Approve / Reject: Allows the command task to proceed as soon as the first response, either an approval or a rejection, is submitted. |
Reply Due Time |
| Optional | The time duration, in minutes, allocated for awaiting a reply. |
CC |
| Optional | Additional recipients, separated by comma, who will receive a copy of the email. All recipients, including those in the To and CC fields, can see each other's email addresses. |
BCC |
| Optional | Additional recipients, separated by commas, who will receive a copy of the email with their addresses hidden from others. BCC recipients can see addresses in the To field but not those in the CC field or other BCC recipients. |
File Source |
| Optional | The source of the file to send. Available options are:
|
File Id |
| Optional | The identifier used to specify the exact file. |
Sample Request
SAMPLE DATA
{
"Username": "Admin",
"Site": "Security Operations",
"CommandParams": {
"To Addresses": "user01@example.com, user02@example.com",
"Subject": "This is a test email",
"Email Body": "
Hi,
This is a test email
regards
",
"Reply Mode": "Require Approval",
"Reply Due Time": 100,
"CC": "user03@example.com",
"BCC": "user04@example.com",
"File Source": "IR Attachment",
"File Id": 1
}
}
Response
Response Fields
Field Name | Type | Description |
---|---|---|
error |
| The error message if the API request has failed. |
keyFields |
| The key fields from the API request. |
returnData |
| The return data from the API request. |
contextData |
| The context data from the API request. |
Sample Response
{
"error": "",
"keyFields": {
"SentTime": "2024-05-27 20:16:01 UTC",
"DueTime": "2024-05-27 21:56:01 UTC",
"ReplyMode": "RequireApproval",
"SentCount": 2,
"State": "Sent",
"ToAddresses": [
"user01@example.com",
"user02@example.com"
]
},
"returnData": "Succeed",
"contextData": {
"sentTime": "2024-05-27 20:08:14 UTC",
"dueTime": "2024-05-27 21:48:14 UTC",
"replyMode": "RequireApproval",
"sent_count": 2,
"state": "Sent",
"to": [
{
"email": "user01@example.com",
"sent": true,
"error": ""
},
{
"email": "user02@example.com",
"sent": true,
"error": ""
}
]
}
}