Use email and sendmail python libs instead of doing stuff by hand