Order Mail is not sending
-
29-09-2020 - |
Question
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
I installed this (https://www.magentocommerce.com/magento-connect/aoe-scheduler.html) Extension for Cron. Below is the screenshot of this extension
Below is the screenshot of System Cron tab.
Below is the screenshot of core_email_queue table of database
Below is the screenshot of Cron setup of my server
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>
Solution
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.
OTHER TIPS
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