Sending mail by pushing a button through ifttt

can we use pushbutton or toggle switch instead of the pir sensor we have used in the tutorials for ifttt. i have to send an email when i push a button connected to pin 4 on bolt kit. i have to add this feature in my final year project so please d help.

I suggest you to use Mail Gun and Bolt APIs to send the mail instead of IFTTT. Here is the link to Mail Gun:

You can use MailGun as PPV have suggested. First, verify your domain on mailgun and after verification, you will get an API key from mailgun.

Refer this python code snippet.

import json
import time
import requests

def send_simple_mail():
        auth=("api", "key-3ax6xnjp29jd6fds4gc373sgvjxteol0"),
        data={"from": "Excited User <>",
              "to": [""],
              "subject": "Hello",
              "text": "Testing some Mailgun awesomeness!"})

while True:
        # Replace api_key with your api key that you will get from bolt cloud
        # Replace device_name with your original device name
        response = requests.get('')
        data = json.loads(response.text)
        if data['value'] > 10:
                print  "temperature is=", data['value']
                print "sending sms"
                print  "temperature is=", data['value']
            print "temperature is normal"
1 Like

thank you sir !! The bolt is not taking the input from push button , i have used pull up configuration. is there anything else i have to add in the code to make it working.

Hi please share your code here as well