Updated mail_cron function to use the email address in the orders object