import RPi.GPIO as GPIO
import os
import time

#adjust for where your switch is connected
buttonPin = 14
GPIO.setmode(GPIO.BCM)
GPIO.setup(buttonPin,GPIO.IN,pull_up_down=GPIO.PUD_UP)

while True:
    #assuming the script to call is long enough we can ignore bouncing
    if (GPIO.input(buttonPin)==0):
        #this is the script that will be called (as root)
        os.system("<mail commando>")
        os.system("sleep 10")
    time.sleep(30)