print error when sending mail fails