update to sort through an array -- now just need to get it running on a cron with a computer that can send email successfully!