added mailer class and set all other classes to extend it, closes #5