Troubles with magento sales emails?
If you are having troubles with Magento sales emails not being sent to your customers, you just need to set/check up on CRON job on your server to see if it is working properly.Starting with Magento 1.9.1 the emails are not being sent directly during checkout but instead are being queued. The queue is being processed via your Magento cronjob.
In this article I will describe how to setup cron jobs in CPanel and via SSH. Setup is very similiar and if you have any other access it would be very likely to this two.
Setup cron job via SSH
Before setting up a new cronjob, please make sure the Magento cronjob (a cron running cron.php) hasn’t been set up yet. Use the following command to get the currently installed cronjobs:
crontab -l
If the cronjob hasn’t been set up yet, you will need to open the crontab file to set up the cronjob. The crontab manages which and when cronjobs are run on the server.
crontab -e
Enter the following line and replace PATH_TO_MAGENTO_INST with real path to directory of your Magento installation and PATH_TO_PHP with path to your php installation:
*/5 * * * * PATH_TO_PHP -f /PATH_TO_MAGENTO_INST/cron.php &> /dev/null
You can find PHP installation path with command <code>which php</code>.
Save file and you will get message crontab: installing new crontab
. And then check once again with crontab -l
.
Setup cron job via CPanel
Find Cron Jobs settings in your panel (Advanced -> Cron jobs) and first check that it has not been set up yet. Now add new cronjob with following parameters and click on button to finish
Now when you setup cron job either cpanel or SSH way, you just have to wait for emails 🙂
If you have installed cronjob, but still have problems with cron or not sure if cron is running, try to install a free extension AOE Scheduler. This extension can show you the status of cron and cron tasks including a timeline view. And dont forget that Magento recommends running cron every minute for EE and every five minutes for CE.