fixed the mail sender to send email alerts