diff --git a/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/EWSO365.py b/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/EWSO365.py index ceb6df1216ce..a2c4fda26088 100644 --- a/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/EWSO365.py +++ b/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/EWSO365.py @@ -1829,7 +1829,7 @@ def handle_template_params(template_params): # pragma: no cover return actual_params -def create_message_object(to, cc, bcc, subject, body, additional_headers, from_address, reply_to): +def create_message_object(to, cc, bcc, subject, body, additional_headers, from_address, reply_to, importance): """Creates the message object according to the existence of additional custom headers. """ if additional_headers: @@ -1841,6 +1841,7 @@ def create_message_object(to, cc, bcc, subject, body, additional_headers, from_a subject=subject, reply_to=reply_to, body=body, + importance=importance, **additional_headers ) @@ -1851,12 +1852,13 @@ def create_message_object(to, cc, bcc, subject, body, additional_headers, from_a bcc_recipients=bcc, subject=subject, reply_to=reply_to, - body=body + body=body, + importance=importance ) def create_message(to, subject='', body='', bcc=None, cc=None, html_body=None, attachments=None, - additional_headers=None, from_address=None, reply_to=None): # pragma: no cover + additional_headers=None, from_address=None, reply_to=None, importance=None): # pragma: no cover """Creates the Message object that will be sent. Args: @@ -1876,7 +1878,7 @@ def create_message(to, subject='', body='', bcc=None, cc=None, html_body=None, a """ if not html_body: # This is a simple text message - we cannot have CIDs here - message = create_message_object(to, cc, bcc, subject, body, additional_headers, from_address, reply_to) + message = create_message_object(to, cc, bcc, subject, body, additional_headers, from_address, reply_to, importance) for attachment in attachments: if not attachment.get('cid'): @@ -1888,7 +1890,7 @@ def create_message(to, subject='', body='', bcc=None, cc=None, html_body=None, a attachments += html_attachments message = create_message_object(to, cc, bcc, subject, HTMLBody(html_body), additional_headers, from_address, - reply_to) + reply_to, importance) for attachment in attachments: if not attachment.get('cid'): @@ -1933,7 +1935,7 @@ class TempClass(ExtendedProperty): def send_email(client: EWSClient, to, subject='', body="", bcc=None, cc=None, htmlBody=None, attachIDs="", attachCIDs="", attachNames="", manualAttachObj=None, transientFile=None, transientFileContent=None, transientFileCID=None, templateParams=None, - additionalHeader=None, raw_message=None, from_address=None, replyTo=None): # pragma: no cover + additionalHeader=None, raw_message=None, from_address=None, replyTo=None, importance=None): # pragma: no cover to = argToList(to) cc = argToList(cc) bcc = argToList(bcc) @@ -1951,7 +1953,8 @@ def send_email(client: EWSClient, to, subject='', body="", bcc=None, cc=None, ht bcc_recipients=bcc, body=raw_message, author=from_address, - reply_to=reply_to + reply_to=reply_to, + importance=importance ) else: @@ -1971,7 +1974,7 @@ def send_email(client: EWSClient, to, subject='', body="", bcc=None, cc=None, ht htmlBody = htmlBody.format(**template_params) message = create_message(to, subject, body, bcc, cc, htmlBody, attachments, additionalHeader, from_address, - reply_to) + reply_to, importance) client.send_email(message) diff --git a/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/EWSO365.yml b/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/EWSO365.yml index ddde857d05e3..d8d7bdf0e450 100644 --- a/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/EWSO365.yml +++ b/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/EWSO365.yml @@ -165,8 +165,7 @@ configuration: type: 15 section: Collect advanced: true -description: |- - The new EWS O365 integration uses OAuth 2.0 protocol and can be used with Exchange Online and Office 365 (mail). +description: The new EWS O365 integration uses OAuth 2.0 protocol and can be used with Exchange Online and Office 365 (mail). display: EWS O365 name: EWSO365 script: @@ -175,22 +174,12 @@ script: - description: The ID of the email message for which to get the attachments. name: item-id required: true - secret: false - - default: false - description: The mailbox in which this attachment was found. If empty, the default mailbox is used. Otherwise the user might require impersonation rights to this mailbox. - isArray: false + - description: The mailbox in which this attachment was found. If empty, the default mailbox is used. Otherwise the user might require impersonation rights to this mailbox. name: target-mailbox - required: false - secret: false - - default: false - description: The attachments ids to get. If none - all attachments will be retrieve from the message. Support multiple attachments with comma-separated value or array. + - description: The attachments ids to get. If none - all attachments will be retrieve from the message. Support multiple attachments with comma-separated value or array. isArray: true name: attachment-ids - required: false - secret: false - deprecated: false description: Retrieves the actual attachments from an item (email message). To get all attachments for a message, only specify the item-id argument. - execution: false name: ews-get-attachment outputs: - contextPath: EWS.Items.FileAttachments.attachmentId @@ -917,6 +906,14 @@ script: - description: Email addresses that need to be used to reply to the message. Supports comma-separated values. isArray: true name: replyTo + - auto: PREDEFINED + defaultValue: Normal + description: Sets the importance/Priority of the email. Default value is Normal + name: importance + predefined: + - High + - Normal + - Low description: Sends an email. name: send-mail - name: reply-mail diff --git a/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/README.md b/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/README.md index f05afa69906a..7976b35e3cc0 100644 --- a/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/README.md +++ b/Packs/MicrosoftExchangeOnline/Integrations/EWSO365/README.md @@ -1377,6 +1377,7 @@ Impersonation rights are required. To perform actions on the target mailbox of o | raw_message | Raw email message to send. If provided, all other arguments, but to, cc and bcc, will be ignored. | Optional | | from_address | The email address from which to reply. | Optional | | replyTo | Email addresses that need to be used to reply to the message. Supports comma-separated values. | Optional | +| importance | Sets the importance/Priority of the email. Default value is Normal. | Optional | #### Context Output diff --git a/Packs/MicrosoftExchangeOnline/ReleaseNotes/1_0_7.md b/Packs/MicrosoftExchangeOnline/ReleaseNotes/1_0_7.md index 82728fd6d327..9523563edcfe 100644 --- a/Packs/MicrosoftExchangeOnline/ReleaseNotes/1_0_7.md +++ b/Packs/MicrosoftExchangeOnline/ReleaseNotes/1_0_7.md @@ -1,3 +1,4 @@ + #### Integrations ##### EWS Extension Online Powershell v2 - Note: Organized the the integrations' parameters by sections. Relevant for XSIAM and XSOAR 8.1 and above. @@ -6,4 +7,4 @@ ##### EWS O365 - Note: Organized the the integrations' parameters by sections. Relevant for XSIAM and XSOAR 8.1 and above. ##### O365 - Security And Compliance - Content Search v2 -- Note: Organized the the integrations' parameters by sections. Relevant for XSIAM and XSOAR 8.1 and above. \ No newline at end of file +- Note: Organized the the integrations' parameters by sections. Relevant for XSIAM and XSOAR 8.1 and above. diff --git a/Packs/MicrosoftExchangeOnline/ReleaseNotes/1_0_8.md b/Packs/MicrosoftExchangeOnline/ReleaseNotes/1_0_8.md new file mode 100644 index 000000000000..c2069fa5250c --- /dev/null +++ b/Packs/MicrosoftExchangeOnline/ReleaseNotes/1_0_8.md @@ -0,0 +1,5 @@ + +#### Integrations +##### EWS O365 +Added support for the *importance* argument in the ***send-mail*** command. +- Updated the Docker image to: *demisto/py3ews:1.0.0.48807*. diff --git a/Packs/MicrosoftExchangeOnline/pack_metadata.json b/Packs/MicrosoftExchangeOnline/pack_metadata.json index 88fbc6db347e..370ea0667237 100644 --- a/Packs/MicrosoftExchangeOnline/pack_metadata.json +++ b/Packs/MicrosoftExchangeOnline/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Microsoft Exchange Online", "description": "Exchange Online and Office 365 (mail)", "support": "xsoar", - "currentVersion": "1.0.7", + "currentVersion": "1.0.8", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", @@ -16,4 +16,4 @@ "xsoar", "marketplacev2" ] -} \ No newline at end of file +}