diff --git a/Packs/EmailCommunication/ReleaseNotes/2_0_14.md b/Packs/EmailCommunication/ReleaseNotes/2_0_14.md new file mode 100644 index 000000000000..f0c6fe5a5607 --- /dev/null +++ b/Packs/EmailCommunication/ReleaseNotes/2_0_14.md @@ -0,0 +1,7 @@ + +#### Scripts + +##### SendEmailReply + +- Updated the **SendEmailReply** script to include a references header when using the **Gmail Single User integration**. This allows email replies sent using this automation to group into conversations in the end user's Gmail inbox. +- Updated the Docker image to: *demisto/python3:3.10.13.80014*. diff --git a/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.py b/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.py index 75a4dc7d34af..e7b715e4871a 100644 --- a/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.py +++ b/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.py @@ -1,5 +1,7 @@ import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 + + import json import random import re @@ -108,6 +110,11 @@ def execute_reply_mail(incident_id, email_subject, subject_include_incident_id, "replyTo": service_mail, "using": mail_sender_instance } + # If using Gmail Single User, + # add references header to mail_content to properly group replies into conversations in user's inbox. + instances = demisto.getModules() + if instances.get(mail_sender_instance, {}).get("brand") == "Gmail Single User": + mail_content["references"] = email_latest_message else: mail_content = { "to": email_to, diff --git a/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.yml b/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.yml index 07197f6586ab..aea72b2cc64f 100644 --- a/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.yml +++ b/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.yml @@ -7,12 +7,10 @@ args: description: Attachment. isArray: true name: attachment -- defaultValue: - description: The mailbox from which emails are sent from the 3rd party integration. +- description: The mailbox from which emails are sent from the 3rd party integration. name: service_mail - name: mail_sender_instance description: Name of the mail sender instance name for transmitting emails. - defaultValue: - name: new_thread auto: PREDEFINED predefined: @@ -46,7 +44,7 @@ subtype: python3 system: true type: python fromversion: 5.0.0 -dockerimage: demisto/python3:3.10.13.78960 +dockerimage: demisto/python3:3.10.13.80014 tests: - No tests (auto formatted) contentitemexportablefields: @@ -55,3 +53,4 @@ contentitemexportablefields: tags: [] scripttarget: 0 runas: DBotWeakRole +runonce: false diff --git a/Packs/EmailCommunication/pack_metadata.json b/Packs/EmailCommunication/pack_metadata.json index e4336a6b903d..207fcbbeb22a 100644 --- a/Packs/EmailCommunication/pack_metadata.json +++ b/Packs/EmailCommunication/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Email Communication", "description": "Do you have to send multiple emails to end users? This content pack helps you streamline the process and automate updates, notifications and more.\n", "support": "xsoar", - "currentVersion": "2.0.13", + "currentVersion": "2.0.14", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "videos": [