cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 - Not Receiving Email After Order

Magento 2 - Not Receiving Email After Order

I have this demo Magento 2 store (ver. 2.4.4) built on a Debian server and for some reason I'm not receiving emails after I make an order.

 

In Stores > Configuration > Sales > Sales Emails I have this:

 

email.PNG

 

My /etc/postfix/main.cf file:

postfix.PNG

I didn't even receive an email when I first installed Magento 2 on my server, so I had to disable the 2FA module in order to login to the backend for the first time.

Any help would be appreciated.

4 REPLIES 4

Re: Magento 2 - Not Receiving Email After Order

Hello @abimaelmon9889 

 

You can install by download it directly from GIT and paste into app/code directory.

 

Here are steps to download and configure:

 

1) Click on the GIT links shared above.

2) From right corner "clone or download" you can select ZIP downlaod

3) Add/Extract first link downloaded directory into "app\code\Mageplaza\Core"

4) Add/Extract second link downloaded directory into "app\code\Mageplaza\Smtp"

5) Run the following command into Magento root directory. 

sudo php bin/magento module:enable Mageplaza_Core -c
sudo php bin/magento module:enable Mageplaza_Smtp -c
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento cache:clean
sudo php bin/magento cache:flush
sudo chmod -R 777 var/ pub/ generated/


Now your both module are available to work:

 

1) Register on mageplaza website for enable extension click here

2) Go to admin panel Store -> SMTP -> Configuration

3) Configure your SMTP extension, add same email Id that used for register on Mageplaza.

4) Save the configuration and it will work for you.

 

Problem solved? Click Accept as Solution!

Re: Magento 2 - Not Receiving Email After Order

Hello abimaelmon9889,

 

When an order is made, online stores must send a sales email or order confirmation to their customers automatically, which is done via configuration in Magento 2. But, If you're facing problems in not receiving Emails after an order, you can follow the below ways to fix the issue,

 

Check the configuration on the admin page:

 

  • Firstly, navigate to System > Configuration Advanced System Mail Sending option.
  • Then, disable the Email Communications options, and choose No.

 

Check server configuration:

 

You must try running the following code,

 

 

<?php
mail ('you@example.com', "Test Postfix", "Test mail from postfix");
?>

 

Note: You will have to enter your email address in place of 'you@example.com'

 

If you don't receive any email using the above code means, you need to check the server settings.

 

You must check the Var/log to find any warning or error related to mail, and check the following configuration:

 

  • Navigate to Stores > Configuration > Advanced > System
  • Under Mail Sending Settings, ensure -  Disable Email Communications is set to No.

Also, verify your Host and Port fields, If using any external mailing server.

  • Now, navigate to Stores > Configuration > Sales > Sales Emails
  • Then, under the general Settings tab, choose Asynchronous sending to Disable.
  • Next, under the Order tab, Enabled to Yes.
  • Lastly, clear/refresh your magento cache.

 

If the issue persists, you must ensure your cronjob setup on your hosting panel or server is running, as it might be causing email delays.

 

Thus, I hope the above information helps you to fix the "Magento 2 - Not Receiving Email After Order" error. 

 

---------------------------

Regards,

Rex M

 

VPS Hosting | Magento Hosting

Re: Magento 2 - Not Receiving Email After Order

hi @Bhanu Periwal 

 

you didn´t share the GIT links

Re: Magento 2 - Not Receiving Email After Order

Hello @rexaccuweb03d6 

 

I verified that my all my settings look like you said, but it still doesn't work.

 

Only thing I don't know how to do is to check if cronjob is running. How can I check for that?

 

Thank you for your reply.