Adds basic error handling for emails