changed way mails are sent