Sending email when motion detected

Please always wrap your code to make it readable!