added cron job to send email, changed approach to sending, added retry counter