Sending email on feature service edit

5183
23
Jump to solution
07-17-2018 06:55 AM
joerodmey
MVP Alum

I'm looking to have an email sent out each time my hosted feature service (on AGOL) has my status field altered. This status field is set to "not complete" by default, and as its completed it changes to "complete". When this happens I want an email sent out.

I've been playing around with webhooks and services likes Microsoft Flow and Integromat but not having too much success.

Any ideas?

Tags (1)
0 Kudos
23 Replies
DougBrowning
MVP Esteemed Contributor

Ok I got it after some searching.  GMAIL is much different.

Do this

change this line #server = smtplib.SMTP(emailSMTP)

to server = smtplib.SMTP_SSL(emailSMTP,465)

Remove the port number from the top so change emailSMTP = "smtp.gmail.com:587"

 to just emailSMTP = "smtp.gmail.com"

Change this line #server.starttls() 

to server.ehlo()

Add your username and pass to the lines

smtpusername = "you@gmail.com"
smtppassword = "pass"

Oh and the big one is go to https://myaccount.google.com/lesssecureapps?pli=1 then enable access!!

It now works.

joerodmey
MVP Alum

It worked!

Thanks

0 Kudos
by Anonymous User
Not applicable

You can also add your support and use case to this idea:

https://community.esri.com/ideas/10344 

0 Kudos
XanderBakker
Esri Esteemed Contributor

I assume that in the future "Webhooks" will be the way to do this, in a similar way as recently implemented with surveys in Survey123: Webhooks—Survey123 for ArcGIS | ArcGIS