Skip to main content
Skip table of contents

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
<p>Hi,</p>
<p>This is a test email.</p>
<p>Regards</p>

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:

  • Incident Attachment File: Manually uploaded file from Incident

  • Playbook File: Output from another Task

  • Artifact File: Ingested Artifact in an Event

Playbook File

File Id

Optional

The identifier used to specify the exact file.

183

Output

Key Fields

Important key-value pairs extracted from Raw Data.

SAMPLE DATA

JSON
{
  "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"
  ]
}
Return Data

The returned result of this command. If some required parameters are not defined, this returned data could be empty. The returned result can be passed down directly to a subsequent command in playbooks.

SAMPLE DATA

JSON
Succeed
Context Data

The response data from the utility command.

SAMPLE DATA

JSON
{
    "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": ""
        }
    ]
}

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

CODE
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

JSON
{
  "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

string

Required

The username of your D3 SOAR account.

Site

string

Required

The D3 SOAR site to run the remote command.

To Addresses

string

Required

Recipient email addresses, separated by commas.

Subject

string

Optional

The email subject line.

Email Body

string

Optional

The main content of the email.

Reply Mode

string

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

integer

Optional

The time duration, in minutes, allocated for awaiting a reply.

CC

string

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

string

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

string

Optional

The source of the file to send. Available options are:

  • Incident Attachment File: Manually uploaded file from Incident

  • Playbook File: Output from another Task

  • Artifact File: Ingested Artifact in an Event

File Id

array<string>

Optional

The identifier used to specify the exact file.

Sample Request

SAMPLE DATA

JSON
{
  "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

string

The error message if the API request has failed.

keyFields

array<JSON>

The key fields from the API request.

returnData

string

The return data from the API request.

contextData

JSON Object

The context data from the API request.

Sample Response

JSON
{
    "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": ""
          }
      ]
    }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.