I have been able to use the Exchange Send Mail function with no problem, but am getting the following error when using the
Exchange Find Email function. The exchange account I am using should have the correct permissions and my folder path appears correct, but I get an error related to the date format.
2019-04-26 12:36:33,847 ERROR [actions_component] <task[functionworker] (<function _call_the_task at 0x7f031829e7d0>, <exchange_find_emails[functions.exchange_find_emails] (id=38, workflow=example_of_exchange_find_emails, user=test.test@test.com) 2019-04-26 18:36:33.153000> exchange_folder_path=u'Top of Information Store/Inbox', exchange_end_date=1556240400000, exchange_start_date=1556028000000, exchange_num_emails=None, exchange_has_attachments=None, exchange_message_subject=u'Example Subject', exchange_search_subfolders=True, exchange_message_body=None, exchange_order_by_recency=None, exchange_sender=u'adminaccount@test.com, exchange_email=u'adminaccount@test.com', exchange_email_ids=u'test.test@test.com')> (<class 'resilient_circuits.action_message.FunctionException_'>): FunctionException_: <Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/fn_exchange/components/exchange_find_emails.py", line 67, in _exchange_find_emails_function
exchange_num_emails, exchange_search_subfolders)
File "/usr/local/lib/python2.7/site-packages/fn_exchange/util/exchange_utils.py", line 149, in get_emails
start_date = EWSDateTime.from_datetime(datetime.datetime.fromtimestamp(start_date/1000, tz=tz))
File "/usr/local/lib/python2.7/site-packages/exchangelib/ewsdatetime.py", line 117, in from_datetime
raise ValueError("%r must be a datetime instance" % d)
ValueError: EWSDateTime(2019, 4, 23, 14, 0, tzinfo=<StaticTzInfo 'Etc/GMT'>) must be a datetime instance
>
File "/usr/local/lib/python2.7/site-packages/circuits/core/manager.py", line 856, in processTask
raise value.extract()
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/circuits/core/manager.py", line 617, in _dispatcher
event_handlers = self._cache[(event.name, channels)]
KeyError: ('exception', ('*',))
------------------------------
Ryan Terry
------------------------------