Skip to content

Commit

Permalink
updated sender_address handling
Browse files Browse the repository at this point in the history
  • Loading branch information
hardik-crest committed Jun 12, 2024
1 parent 4a2b1c1 commit 190a9ff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions smtp_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,15 @@ def _send_email(self, param, action_result):

# username = self.get_config()[phantom.APP_JSON_USERNAME]
config = self.get_config()
sender_address = config.get("sender_address")

if sender_address:
ret_val = self._validate_sender_email(action_result, sender_address)
if phantom.is_fail(ret_val):
return action_result.get_status()
else:
sender_address = config.get(phantom.APP_JSON_USERNAME)

# Derive 'from' email address
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
Expand Down

0 comments on commit 190a9ff

Please sign in to comment.