diff --git a/README.md b/README.md
index 1dae2ca..b49d64e 100644
--- a/README.md
+++ b/README.md
@@ -307,7 +307,7 @@ Some points to note:
- Only files present in the vault can be atta
#### Action Parameters
PARAMETER | REQUIRED | DESCRIPTION | TYPE | CONTAINS
--------- | -------- | ----------- | ---- | --------
-**from** | optional | Sender Address, domain can not include 'phantom', 'splunk', or 'cisco' | string | `email`
+**from** | optional | Sender Address | string | `email`
**to** | required | List of recipients email addresses | string | `email`
**cc** | optional | List of recipients email addresses to include on cc line | string | `email`
**bcc** | optional | List of recipients email addresses to include on bcc line | string | `email`
@@ -367,7 +367,7 @@ If the from parameter is not provided, then the action will consider the
#### Action Parameters
PARAMETER | REQUIRED | DESCRIPTION | TYPE | CONTAINS
--------- | -------- | ----------- | ---- | --------
-**from** | optional | Sender Address, domain can not include 'phantom', 'splunk', or 'cisco' | string | `email`
+**from** | optional | Sender Address | string | `email`
**to** | required | List of recipients email addresses | string | `email`
**cc** | optional | List of recipients email addresses to include on cc line | string | `email`
**bcc** | optional | List of recipients email addresses to include on bcc line | string | `email`
diff --git a/release_notes/3.2.1.md b/release_notes/3.2.1.md
new file mode 100644
index 0000000..8f8a5b0
--- /dev/null
+++ b/release_notes/3.2.1.md
@@ -0,0 +1 @@
+* Removed doamin restrictions for 'from' field in **send email** and **send htmlemail** actions as they were too strict [PAPP-34625]
\ No newline at end of file
diff --git a/smtp.json b/smtp.json
index 1a24b8d..c52ff41 100644
--- a/smtp.json
+++ b/smtp.json
@@ -6,7 +6,7 @@
"type": "email",
"main_module": "smtp_connector.py",
"app_version": "3.3.0",
- "utctime_updated": "2023-01-23T18:26:04.000000Z",
+ "utctime_updated": "2024-03-06T13:04:08.000000Z",
"package_name": "phantom_smtp",
"product_vendor": "Generic",
"product_name": "SMTP",
@@ -135,7 +135,7 @@
"read_only": false,
"parameters": {
"from": {
- "description": "Sender Address, domain can not include 'phantom', 'splunk', or 'cisco'",
+ "description": "Sender Address",
"data_type": "string",
"order": 0,
"contains": [
@@ -404,7 +404,7 @@
"read_only": false,
"parameters": {
"from": {
- "description": "Sender Address, domain can not include 'phantom', 'splunk', or 'cisco'",
+ "description": "Sender Address",
"data_type": "string",
"order": 0,
"primary": true,
diff --git a/smtp_connector.py b/smtp_connector.py
index 078aa1a..d24d4d8 100644
--- a/smtp_connector.py
+++ b/smtp_connector.py
@@ -238,21 +238,6 @@ def _validate_integer(self, action_result, parameter, key, allow_zero=False):
return phantom.APP_SUCCESS, parameter
- def _validate_sender_email(self, action_result, input_data):
- # sender emails also have additional restriction
- # to not include splunk related terms in the domain name
- restricted_domains = ["splunk", "cisco", "phantom"]
- domain = input_data.split("@")[-1].lower()
-
- if any(restricted_domain in domain for restricted_domain in restricted_domains):
- return action_result.set_status(
- phantom.APP_ERROR,
- "The domain provided in email is restricted (contains one of : splunk, cisco, phantom).\
- Please use a different email in the 'from' field."
- )
-
- return action_result.set_status(phantom.APP_SUCCESS)
-
def make_rest_call(self, action_result, url, verify=False):
try:
@@ -812,7 +797,6 @@ def _is_html(self, body):
return False
def _send_email(self, param, action_result):
- action_id = self.get_action_identifier()
# username = self.get_config()[phantom.APP_JSON_USERNAME]
config = self.get_config()
@@ -821,12 +805,6 @@ def _send_email(self, param, action_result):
sender_address = config.get('sender_address', config.get(phantom.APP_JSON_USERNAME))
email_from = param.get(SMTP_JSON_FROM, sender_address)
- # validate sender email if inputted as a parameter
- if action_id != "test_connectivity" and param.get(SMTP_JSON_FROM):
- ret_val = self._validate_sender_email(action_result, email_from)
- if phantom.is_fail(ret_val):
- return action_result.get_status()
-
encoding = config.get(SMTP_ENCODING, False)
smtputf8 = config.get(SMTP_ALLOW_SMTPUTF8, False)
body = param[SMTP_JSON_BODY]
@@ -1048,12 +1026,6 @@ def _handle_send_htmlemail(self, param): # noqa: C901
sender_address = config.get('sender_address', config.get(phantom.APP_JSON_USERNAME))
email_from = param.get(SMTP_JSON_FROM, sender_address)
- # validate sender email if inputted as a parameter
- if param.get(SMTP_JSON_FROM):
- ret_val = self._validate_sender_email(action_result, email_from)
- if phantom.is_fail(ret_val):
- return action_result.get_status()
-
email_to = param['to']
email_cc = param.get('cc')
email_bcc = param.get('bcc')