Polished prepare_email, implemented send_email. Script largely works, but still has a couple bugs to work out with embedding images into email
working version of script