Send an email when door is opened or closed.