2

Hello could anyone help me to resolve my order email problem, i am struggling with setting up cron job in hostgator, currently i am running on shared plan, as per hostgator, in shared service plans PHP version 5.4 is installed.

and i have installed Magento CE 1.9.1.0.

i have tried following two commends from the cpanel and scheduled it for 15 mins.

/opt/php55/bin/php -q /homedirectory/username/public_html/cron.php

/opt/php54/bin/php -q /homedirectory/username/public_html/cron.php

and i am not receiving order emails :(.

other than scheduling cron.php from magento, is there anything else i need to do in the magento itself inorder to receive emails? ( i have already enabled and setup "order email" in "Sales email" tab)

Also i confirm order emails are going in core_email_queue table.

Thank you in advance for any helps..

  • Does it work when you run the cron.php directly, like http://www.yoursite.com/cron.php? – seanbreeden Feb 7 '15 at 12:13
  • No it does not work, it opens a blank page, but the cron.php did not send the email. i also made sure is the cron.php is really called by the hosting schedules by renaming the cron.php file as cronnnn.php, then i received a email saying file cannot be open, so i am sure hosting is running the cron.php file as scheduled.. – Helmey Hussain Feb 7 '15 at 13:17
  • Create a php file called pi.php (or whatever) and run <?php phpinfo(); Check the disable_functions line to make sure mail isn't in there. If it is then you'll need to set up SMTP in Magento's admin. – seanbreeden Feb 7 '15 at 13:22
  • Have you contacted HostGator to see if they're intentionally blocking outgoing mail? I know some shared accounts will do this to prevent people from signing up to send spam. – seanbreeden Feb 7 '15 at 13:23
  • Ok i will try to do that, pi.php sould be the copy of cron.php? and regarding running <?php phpinfo() directly from the command prompt and checking diable_function, i need to figure out how to do, i am really new to this.., but anyway thank you for your comments, i will try your hints and then come back.. – Helmey Hussain Feb 7 '15 at 13:31
2

(Continued from the Question comments)

That sounds like a reasonable course of action to take. The consensus seems to be that something has to be wrong with your cron.

If clearing the queue doesn't make the e-mails start sending then there's a thread on here that I found that has some suggestions.

New order email confirmation not being sent

  • Yes i tried that before by removing the code which is sending the emails to the queue and emails start going on instant click instead of going into the queue... but i did not want to deviate from magneto way of sending emails. Installing AOE_SCHEDULER really helped to see the status and to run the job manually, etc. – Helmey Hussain Feb 7 '15 at 16:17
  • Agreed. It's always best to adhere to Magento standards. – seanbreeden Feb 7 '15 at 16:20
  • I have one wired guess, From the AOE schedule i can see this script core_email_queue_send_all is getting scheduled for every one minute inside the magento, can also check from the cron expression */1 * * * *, whereas from the server it could be actually */5 * * * * or */15 * * * *, Probably this could be an issue? – Helmey Hussain Feb 7 '15 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.