We received a repetitive common complaint from our customers that order confirmation emails are not fired from Magento when they have recently upgraded Magento community version 1.9.x. We digged in to this. On our investigation we noticed that Magento has changed the mechanism of sending email to customer. Previous version of Magento was directly sending email to customer but this new version has special tables to save it as queue and process it every time when cron.php runs.
Conclusion of above is that we should always set cron.php to run after every 10 min in order to send order confirmation email within 10min of placing order. The other work around is to bypass the functionality of adding email in queue and send email directly to customer as per old version. There is a change in core file so we have to over write it. Its very simple and we have already developed code to overcome this. So please send email at firstname.lastname@example.org to get it working on your site. Don’t worry we will not charge you more 🙂 .
There will be one critical issue and you need to be careful when setting cron.php on staging site. We also faced this when creating staging or local copy of current live site and try to run cron.php. If data base is from live site it will check the queue and process email sending functionality. This is critical and dangerous since your customers might get the TEST email from your local or staging server which can affect your reputation please be careful and always clear these two tables (core_email_queue and core_email_queue_recipients) when you make copy of live site on staging to avoid the fumble of sending TEST email to your vital mail list.