Better error handling, working email sending with mailtrap.io and googlemail