AnsweredAssumed Answered

Email Notification script http error

Question asked by 42dlee on Jan 27, 2020

I've having issues with the email notification script.  We recently changed everything on our in-house server to https.  The script had been running fine until this change occurred.

I've updated the url's in the email notification script and get and error on the HTTPError: this service url encountered an HTTP Error: https://services.arcgis.com/xhDV83hFoiDFnMbw/arcgis/rest/services/CitizenConcernReports_public/FeatureServer/0?token=Do6hTfMgc7N5-vmbKBJ3TgqxDWOS72CHoVRMk7ta4jdF4mmnWRdSJVJ6mt6Zzq_fNzDpYf3ZZw7n0PIa7CxHE7WbFDwcUxF5uYIF_3FRaht1QrFpA_AHIRlfrKM9QMQgK3TVnr2v4ge84tVCRoJPb_ArzOlfRAc6GfHgGOLLZHCigr2UpCw3xhKQt9IwoOnNTnBs7JWdqEG9s4PKrxQNWEl7s2Jq5_HCVS6ZkLywSfF5nTDBNPEJMep1RdIUJYzo

 

Here is the script:

email_services = [
{'service url': 'https://services.arcgis.com/xhDV83hFoiDFnMbw/arcgis/rest/services/CitizenConcernReports_public/FeatureServer/0?token=Do6hTfMgc7N5-vmbKBJ3TgqxDWOS72CHoVRMk7ta4jdF4mmnWRdSJVJ6mt6Zzq_fNzDpYf3ZZw7n0PIa7CxHE7WbFDwcUxF5uYIF_3FRaht1QrFpA_AHIRlfrKM9QMQgK3TVnr2v4ge84tVCRoJPb_ArzOlfRAc6GfHgGOLLZHCigr2UpCw3xhKQt9IwoOnNTnBs7JWdqEG9s4PKrxQNWEl7s2Jq5_HCVS6ZkLywSfF5nTDBNPEJMep1RdIUJYzo',
'messages': [
{'query': "STATUS='Submitted'",
'email address': 'firesafety@mymorristown.com',
'email body template': r'C:\Users\dlee\Documents\GIS Projects\Debbies Maps\Citizens Concern App\Working Files\EmailNotifications\internal_email_template - Copy.html',
'email subject': 'A concern has been submitted',
'body substitutions': {'{Type of Concern}': 'PROBTYPE',
'{Details Submitted}': 'DETAILS',
'{name}': 'NAME',
'{Phone}':'PHONE',
'{Email}': 'EMAIL' },
'status field': 'STATUS',
'completed value': 'Received'},
{'query': "STATUS='Received'",
'email address': 'EMAIL',
'email body template': r'C:\Users\dlee\Documents\GIS Projects\Debbies Maps\Citizens Concern App\Working Files\EmailNotifications\internal_email_template - external.html',
'email subject': 'Thank you for submitting your concern',
'body substitutions': {'{Type of Concern}': 'PROBTYPE',
'{Details Submitted}': 'DETAILS',
'{Assigned To}': 'ASSIGNEDTO',
'{name}': 'NAME',
'{Phone}':'PHONE',
'{Email}': 'EMAIL',
'{OBJECTID}': 'OBJECTID'},
'status field': 'STATUS',
'completed value': 'Received'}
]},

Outcomes