Send email when threshold is reached


#1

Hi , I wanted to know if I could directly write python script to send email notification when the threshold value in A0 is reached.
(The script uses standard library smtplib)


#2

Hi Sachin,

Yes, you can do that via script. We have a section dedicated to that in our course “https://trainings.boltiot.com/p/iotandml” in which you have already enrolled.

We have instructed to use a third-party tool called Mailgun to send the email. If you want to do it via SMTP, please refer this blog. Rest of the code will remain the same apart from mail sending logic.


#3

HI
I tried using smtplib library from python standard library to send email alerts and succeded in doing so.
I’m attaching the code I have written for this project.
I’ve stored required credentials like gmail_user,gmail_pwd,to,bolt api,and device id in different files and imported them in this code.


#4

@nandinibangale.0211 Thats great! Why don’t you make a project based on it on hackster.io?