Recipient Email Address: Send Emails Tool

1053
3
Jump to solution
02-28-2020 09:03 AM
JaredPilbeam2
MVP Regular Contributor


I'm attempting to send multiple emails, and they are four separate Email Settings because each one uses a query to grab a certain field and then sends to its corresponding recipient. The tool states that emails will be sent in the order listed. I'm finding that only the Recipient Email Address in the top one is being used, while the other Recipient Email Addresses are ignored. Has anyone seen this behavior?

1 Solution

Accepted Solutions
JaredPilbeam2
MVP Regular Contributor

Hi Don,

Thanks. I've since figured it out. Here are the full queries:

send_email IS NULL Or send_email = '""' And field_2 = 'parcel_or_pin_question?'
send_email IS NULL Or send_email = '""' And field_2 = 'street_or_address_question?'
send_email IS NULL Or send_email = '""' And field_2 = 'tax_related_question?'
send_email IS NULL Or send_email = '""' And field_2 = 'zoning_or_flood_zone_question?'
send_email = '""' Or send_email IS NULL And field_2 = 'other'

My feature layer is populated through Survey123. The fields in the layer are populated based off of the entries in the survey. So, for example a survey was just submitted about a 'parcel or pin question'. That field in the layer is in turn populated and once the send emails script runs it will run the query and an email will be sent to the corresponding department (or whoever I have as a recipient). I actually removed Or send_email = '""'.

If you have a question about it maybe I can help. By the way, it's a know bug that you can't send to multiple recipients with this tool: ENH-000116673 Provide the ability to enter multiple email addresses in the Recipient Email Address s... 

View solution in original post

0 Kudos
3 Replies
DonHubbard2
New Contributor

I am also in the process of getting this set up and having issues with getting the "Send Emails" to work correctly. I know very little about SQL, but if you look at your first SQL Query, "send_email IS NULL Or send_email = "''" A" (can't read what is past the "A"), then it updates the send_email field to "sent". When it gets to the next configuration, the send_email is already populated with "sent" and no longer Null or blank. I may be wrong, but try to leave the Field to Update and Sent Value blank until the last configuration.

0 Kudos
JaredPilbeam2
MVP Regular Contributor

Hi Don,

Thanks. I've since figured it out. Here are the full queries:

send_email IS NULL Or send_email = '""' And field_2 = 'parcel_or_pin_question?'
send_email IS NULL Or send_email = '""' And field_2 = 'street_or_address_question?'
send_email IS NULL Or send_email = '""' And field_2 = 'tax_related_question?'
send_email IS NULL Or send_email = '""' And field_2 = 'zoning_or_flood_zone_question?'
send_email = '""' Or send_email IS NULL And field_2 = 'other'

My feature layer is populated through Survey123. The fields in the layer are populated based off of the entries in the survey. So, for example a survey was just submitted about a 'parcel or pin question'. That field in the layer is in turn populated and once the send emails script runs it will run the query and an email will be sent to the corresponding department (or whoever I have as a recipient). I actually removed Or send_email = '""'.

If you have a question about it maybe I can help. By the way, it's a know bug that you can't send to multiple recipients with this tool: ENH-000116673 Provide the ability to enter multiple email addresses in the Recipient Email Address s... 

0 Kudos
DonHubbard2
New Contributor

Hello Jared,

I'm glad you was able to get it working. I am setting up the "Send Emails" to send automatic replies for when they submit a report and when the issue is resolved, and I have been running into issues with sending to multiple recipients. It looks like I need to find a work-around.

0 Kudos