Make the mailer a service. Fix #691

- Duplicate code was removed
- $addUTM parameter was introduced to mimic the behaviour of the frontendMailer
- The mailer was added as a service