Skip to main content

Mail Sender (New)

This Integration is part of the Mail Sender (New) Pack.#

This is a Python script for sending emails, which includes various attachment implementations.

Supported Authentication

This integration does not support NTLM authentication. If you are using Exchange as the SMTP server for sending mail and receive the error message: No suitable authentication method found. make sure that you enable Basic Authentication for SMTP authenticationĀ in your Exchange environment.

This example shows Basic Authentication on Exchange 2010:


Configure Mail Sender on Cortex XSOAR

  1. Navigate to Settings > Integrations > Servers & Services .
  2. Search for Mail Sender (New).
  3. Click Add instance to create and configure a new integration instance.
    • Name: a textual name for the integration instance
    • Mail server hostname or IP address
    • SMTP Port
    • Credentials
    • Password
    • Sender address : if the sender address is different than the log-in credentials and password, the sender address must have permission to send emails.
    • FQDN : Fully Qualified Domain Name, used in EHLO
    • Use TLS for connection
    • Do not validate server certificate (not secure)
  4. Click Test to validate the URLs, token, and connection.


  1. Send email: send-mail

1. Send email

Sends an email.

Basic Command


Argument Name Description
to Recipient email address
cc Additional recipient email address
bcc Additional recipient email address
subject Subject of the email
body Content of the email in plain text
htmlBody Content of the email in html format

If recipient chooses to reply, reply will automatically be sent to this email address

attachIDs Comma-separated list of IDs of war room entries that contain the files you want to attach to the email

A comma-separated list of new names, to rename attachments, in correspondence with the order that they were attached to the email.


  • To rename first and third file: attachNames=new_fileName1,,new_fileName3
  • To rename second and fifth files: attachNames=,new_fileName2,,,new_fileName5

A comma-separated list of CIDs to embed attachments inside the email itself


Textual name for attached file. Multiple files are supported.


Content for attached file. Multiple files are supported.


transientFile.1="t1.txt" transientFileContent.1="test 1" transientFile.2="t3.txt" transientFileContent.2="test 3"


CID for attached file if you want it inline. Multiple files are supported.


transientFile.1="t1.txt" transientFileContent.1="test 1" transientFileCID.1="t1.txt@xxx.yyy" transientFile.2="t3.txt" transientFileContent.2="test 3"


Replace {varname} variables with values from this parameter.

Expected values are in the form of a JSON document


      "value":"some value",
      "key":"context key"

Each var name can either be provided with a value or a context key to retrieve the value from. Note that only context data is accessible for this argument, while incident fields are not.


Custom header to add to an email.

Command Example
!send-mail to="" cc="" bcc="" subject="Topic of the day" replyTo="" attachIDs="111@02a9cf84-c76f-4b2e-8840-c6b2a85c53cf,129@02a9cf84-c86f-4b2e-8840-c6c2a89c53cf" attachNames="notcookie.png,cookie.jpg" attachCIDs="notcookie,mycookie" transientFile="friendly_note.txt" transientFileContent="this is some text" htmlBody="<html>
<img src=\"cid:mycookie\"/>

About CIDs

CIDs work by attaching the image to the email you are sending, and then using standard HTML image tags that reference that image to embed it in the email when the user opens it.

    <img src=\"cid:radomimagecid\"/>

CID Limitations

CID is not supported on all email applications. ItĀ is supported mainly on Outlook.

On web applications, such as Gmail, adding CID duplicates the attachment: as an actual attachment and embedded in the text body.