Added a mailer for the tasks and converted the internal mesages to the mailer