Mail Sender (New)
Mail Sender (New) Pack.#
This Integration is part of theThis 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
- Navigate to Settings > Integrations > Servers & Services .
- Search for Mail Sender (New).
-
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)
- Click Test to validate the URLs, token, and connection.
Commands
1. Send email
Sends an email.
Basic Command
send-mail
Input
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 |
replyTo |
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 |
attachNames |
A comma-separated list of new names, to rename attachments, in correspondence with the order that they were attached to the email. Examples:
|
attachCIDs |
A comma-separated list of CIDs to embed attachments inside the email itself |
transientFile |
Textual name for attached file. Multiple files are supported. |
transientFileContent |
Content for attached file. Multiple files are supported. Example: transientFile.1="t1.txt" transientFileContent.1="test 1" transientFile.2="t3.txt" transientFileContent.2="test 3" |
transientFileCID |
CID for attached file if you want it inline. Multiple files are supported. Example: transientFile.1="t1.txt" transientFileContent.1="test 1" transientFileCID.1="t1.txt@xxx.yyy" transientFile.2="t3.txt" transientFileContent.2="test 3" |
templateParams |
Replace {varname} variables with values from this parameter. Expected values are in the form of a JSON document Example: { "varname":{ "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. |
additionalHeader |
Custom header to add to an email. |
Command Example
!send-mail to="name@example.com" cc="test@example.com" bcc="admin@example.com" subject="Topic of the day" replyTo="replymail@example.com" 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>
<body>
<p>HELLO</p>
<img src=\"cid:mycookie\"/>
</body>
</html>"
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.
Example:
<html> <body> <img src=\"cid:radomimagecid\"/> </body> </html>
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.