added a footer to each email
added error handling