Recently, I setup magento staging environment in AWS, site is working without any problem except Order confirmation mails, when i avoid cron, mails are sending but when i use cron mails are not sending. aoe-scheduler is enabled, cron (scheduled tasks) are set, heartbeat task schedule is set to every 5 minutes. All the settings in admin panel are similar to live environment,

Does anyone know how to solve this issue ? i dont want to avoid cron.

  • is the issue with order-confirmation emails only?
    – Piyush
    Commented Nov 1, 2017 at 12:34
  • yes , only order confirmation mails.
    – vindhya
    Commented Nov 1, 2017 at 12:47
  • are you sure your crons are working (you have added cron.sh in crontab)?
    – Piyush
    Commented Nov 1, 2017 at 13:06
  • yes, i added cron.sh in crontab,
    – vindhya
    Commented Nov 1, 2017 at 13:10

1 Answer 1


The Issue Occured because of Cron to Avoid Cron Open your order.php file at


Just Copy the File and Paste into app/code/local/Magento/Sales/Model/Order.php

and change



$mailer-> send();

It's working fine for me.


  • Thanks for your reply ,But if i avoid cron , anything else is going to affect ?
    – vindhya
    Commented Nov 1, 2017 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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