Updated mail sender function to allow templates
Included testing file for mailer