modified the way emailer sends emails
made the mail_queue iterates only once, so that all element will be poped up during iteration