Issues in the mailgun section

I’m getting error while passing the below code

Error in the output :

Any help…

did you copied and pasted the code of temp_sms?
then all the tabs used in temp_sms are replaced by spaces in temp_email.

solution- Now you replace all the spaces of temp_email by tab and try running it again.

1 Like

no, I have typed every line of code

try writing normal Alert if it works

1 Like

Check the 2nd line inside the if block

response=mailer.send_email("ALERT!", "Sensor value is" +str(sensor_value))

Check if you missed any of the end brackets.


you are correct bro…

hello guys,
im getting the following error which is attached pic,

help me out for this error.!

HI Sachin…

you have made a mistake in using json syntax…
You should use “data=json.loads(response)” instead of “json.load(response)”…

hope this will solve the issue…revert if not…

thanks bro
i have checked it that time only it is clear now, but im not getting any mail and sms (for last sms project) after crossing its threshold limit. so please let me know.

yes,API key gets blocked if number of calls exceeds some fixed number of calls set by BOLT.
but usually they restore it next day…

yes tha API key will block for 6 hr.
even the program is correct and after crossing the threshold limit it should send a mail right,
im not getting the response or alert through mail,
the output is showing correct.\