Skip to content

Commit

Permalink
SOARHELP-2947 | Fix SMTP connector re-new token issue
Browse files Browse the repository at this point in the history
  • Loading branch information
achandya-crest committed Feb 19, 2024
1 parent 4fdf57e commit c686531
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion smtp.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"publisher": "Splunk",
"type": "email",
"main_module": "smtp_connector.py",
"app_version": "3.1.0",
"app_version": "3.2.0",
"utctime_updated": "2023-01-23T18:26:04.000000Z",
"package_name": "phantom_smtp",
"product_vendor": "Generic",
Expand Down
6 changes: 6 additions & 0 deletions smtp_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,13 @@ def _connect_to_server(self, action_result, first_try=True):
if not ret_val:
return action_result.set_status(phantom.APP_ERROR, message)
return self._connect_to_server(action_result, False)
elif response_code == 535:
ret_val, message = self._interactive_auth_refresh()
if not ret_val:
return action_result.set_status(phantom.APP_ERROR, message)
return self._connect_to_server(action_result, False)
elif response_code != 235:
self.debug_print(f"Error while connecting to SMTP server, Response code: {response_code}, Response: {response_message}")
return action_result.set_status(phantom.APP_ERROR,
"Logging in error, response_code: {0} response: {1}".format(response_code, response_message))

Expand Down

0 comments on commit c686531

Please sign in to comment.