templating of email body, slightly nicer error handling