1

I am using Magento 1.9.2.2. When a customer place order then confirmation mail is not sending.

My Sales Emails section is as like below

enter image description here

I installed this (https://www.magentocommerce.com/magento-connect/aoe-scheduler.html) Extension for Cron. Below is the screenshot of this extension

enter image description here

Below is the screenshot of System Cron tab.

enter image description here

Below is the screenshot of core_email_queue table of database

enter image description here

Below is the screenshot of Cron setup of my server

enter image description here

Cron is running. I am getting notification when cron runs. Can anyone help me in this regard ??

Update

I found below codes in .htaccess file.

###########################################
## Deny access to cron.php
    <Files cron.php>

############################################
## uncomment next lines to enable cron access with base HTTP authorization
## http://httpd.apache.org/docs/2.2/howto/auth.html
##
## Warning: .htpasswd file should be placed somewhere not accessible from the web.
## This is so that folks cannot download the password file.
## For example, if your documents are served out of /usr/local/apache/htdocs
## you might want to put the password file(s) in /usr/local/apache/.

        #AuthName "Cron auth"
        #AuthUserFile ../.htpasswd
        #AuthType basic
        #Require valid-user

############################################

        Order allow,deny
        Deny from all

    </Files>
12
  • run yoururl/cron.php what output comes? Apr 30, 2016 at 7:10
  • www.example.com/cron.php Apr 30, 2016 at 7:11
  • Thanks @denishvachhani for your reply. I am getting notification when cron runs.Thanks
    – abu abu
    Apr 30, 2016 at 7:18
  • yes but url/cron.php run in browser 404 comes??? Apr 30, 2016 at 7:19
  • I am getting (Forbidden You do not have permission to access this document) when I am running url/cron.php in browser. Thanks
    – abu abu
    Apr 30, 2016 at 7:22

2 Answers 2

2

comment out the bellow two lines in .htaccess

    <Files cron.php>

############################################
## uncomment next lines to enable cron access with base HTTP authorization
## http://httpd.apache.org/docs/2.2/howto/auth.html
##
## Warning: .htpasswd file should be placed somewhere not accessible from the web.
## This is so that folks cannot download the password file.
## For example, if your documents are served out of /usr/local/apache/htdocs
## you might want to put the password file(s) in /usr/local/apache/.

        #AuthName "Cron auth"
        #AuthUserFile ../.htpasswd
        #AuthType basic
        #Require valid-user

############################################

        #Order allow,deny
        #Deny from all

    </Files>

Replace code with this. because .htacess dont allow cron and access denied from this code.

Try with this command in cpanel in cron

wget -q -O /dev/null http://www.example.com/cron.php

I hope this will help you.

2
  • Thanks for your answer. I modified .htaccess file as per your instruction. But Cron is running as like before. Order mail is not sending like previous. Did you see the screen shot of core_email_queue table of Database ?? I think the problem is there. On the other hand I am running scheduler_cron.sh file. Issue can be there. Thanks
    – abu abu
    Apr 30, 2016 at 8:38
  • Your solution is working but Customer mail is not sending. Customer is not getting any mail. Thanks
    – abu abu
    May 2, 2016 at 9:23
0

You are using curl to call the shell file. This is not possible (normally)

Either

  • Let curl call cron.php and uncomment the block in htaccess (and add allow for local host only)
  • or set cron to let she'll execute the cron.sh file directly

    • or let php call the file directly (eg php -f /pathtofile/cron.php) and set this as command in cron

Should solve the cron to run

2
  • Currently mail is sending but customer is not getting any mail while he is ordering. Thanks
    – abu abu
    May 2, 2016 at 9:24
  • Please accept the answer that helped you. And raise a new question. Or google first. There can be many reasons.
    – snh_nl
    May 2, 2016 at 9:52

Your Answer

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

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