add logging for mails