Add logs to mailer, and separated the initialization of the transport and the transport itself