Added logging, mailer, sample config