Logger: extracted method sendEmail() from log()