What is the cheapest way to email someone whenever a button is pressed or a switch is closed?
The cheapest way is to wire a switch on your door directly to your PC, shorting a key on the keyboard. The rest is 'free' programming. 20m of wire and a decent momentary push-button switch cost about $5 in Canada.