cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 Email not Sending

SOLVED

Magento 2 Email not Sending

Hello People

I am having some problems with Magento 2 emails, as I am not receiving them. I am not really sure what is going on. I have done a lot of searching but have not found a solution yet. There are not really any error log to work with, with is weird.

Magento 2 is loging this in the systems.log file, I dont no if it has anything to do with the problem I am having.

[2018-09-07 18:30:29] main.INFO: Cron Job ddg_automation_catalog_sync is run [] [] [2018-09-07 18:30:29] main.INFO: Cron Job ddg_automation_catalog_sync is successfully finished. Statistics: {"sum":0.017189979553223,"count":1,"realmem":0,"emalloc":723464,"realmem_start":33554432,"emalloc_start":31771072} [] [] [2018-09-07 18:30:29] main.INFO: Cron Job ddg_automation_customer_subscriber_guest_sync is run [] [] [2018-09-07 18:30:29] main.INFO: Cron Job ddg_automation_customer_subscriber_guest_sync is successfully finished. Statistics: {"sum":0.014199018478394,"count":1,"realmem":0,"emalloc":463712,"realmem_start":33554432,"emalloc_start":32494616} [] [] [2018-09-07 18:30:29] main.INFO: Cron Job ddg_automation_importer is run [] [] [2018-09-07 18:30:29] main.INFO: Cron Job ddg_automation_importer is successfully finished. Statistics: {"sum":0.018417119979858,"count":1,"realmem":0,"emalloc":94848,"realmem_start":33554432,"emalloc_start":32958008} [] [] [2018-09-07 18:30:29] main.INFO: Cron Job ddg_automation_order_sync is run [] [] [2018-09-07 18:30:29] main.INFO: Cron Job ddg_automation_order_sync is successfully finished. Statistics: {"sum":0.021106958389282,"count":1,"realmem":2097152,"emalloc":479792,"realmem_start":33554432,"emalloc_start":33052632} [] [] [2018-09-07 18:30:30] main.INFO: Cron Job ddg_automation_reviews_and_wishlist is run [] [] [2018-09-07 18:30:30] main.INFO: Cron Job ddg_automation_reviews_and_wishlist is successfully finished. Statistics: {"sum":0.0093498229980469,"count":1,"realmem":0,"emalloc":423344,"realmem_start":35651584,"emalloc_start":33532088} [] [] [2018-09-07 18:30:30] main.INFO: Cron Job ddg_automation_status is run [] [] [2018-09-07 18:30:30] main.INFO: Cron Job ddg_automation_status is successfully finished. Statistics: {"sum":0.018826961517334,"count":1,"realmem":0,"emalloc":95336,"realmem_start":35651584,"emalloc_start":33955096} [] [] [2018-09-07 18:31:02] main.INFO: Cron Job indexer_reindex_all_invalid is run [] [] [2018-09-07 18:31:02] main.INFO: Cron Job indexer_reindex_all_invalid is successfully finished. Statistics: {"sum":0.016886949539185,"count":1,"realmem":0,"emalloc":748448,"realmem_start":33554432,"emalloc_start":30699400} [] [] [2018-09-07 18:31:03] main.INFO: Cron Job indexer_update_all_views is run [] [] [2018-09-07 18:31:03] main.INFO: Cron Job indexer_update_all_views is successfully finished. Statistics: {"sum":0.072280168533325,"count":1,"realmem":0,"emalloc":278680,"realmem_start":33554432,"emalloc_start":31450736} [] [] [2018-09-07 18:31:06] main.WARNING: Could not acquire lock for cron group: default, skipping run [] []


I have made sure that all the setting are right. I dont think I have missed anything. there are some screen shots of the settings.

Screen Shot 2018-09-07 at 12.04.47 PM.pngScreen Shot 2018-09-07 at 12.03.48 PM.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2 Email not Sending

Hello @mcmagento_mcmagento,

 

Please create an external file on the server to check PHP mail function is working or not.

Here is a reference of sample code of mail 

 

<?php
// the message
$msg = "First line of text\nSecond line of text";

// use wordwrap() if lines are longer than 70 characters
$msg = wordwrap($msg,70);

// send email
mail("someone@example.com","My subject",$msg);
?>

If it is disabled then enable it and check on Magento store by creating a user. Let me know if you have any trouble.

 

--
If my answer is useful, please Accept as Solution & give Kudos

 

 

View solution in original post

6 REPLIES 6

Re: Magento 2 Email not Sending

Hello @mcmagento_mcmagento,

 

Please create an external file on the server to check PHP mail function is working or not.

Here is a reference of sample code of mail 

 

<?php
// the message
$msg = "First line of text\nSecond line of text";

// use wordwrap() if lines are longer than 70 characters
$msg = wordwrap($msg,70);

// send email
mail("someone@example.com","My subject",$msg);
?>

If it is disabled then enable it and check on Magento store by creating a user. Let me know if you have any trouble.

 

--
If my answer is useful, please Accept as Solution & give Kudos

 

 

Re: Magento 2 Email not Sending

Hello @mcmagento_mcmagento,

 

You can configure SMTP to send emails. Sendgrid provides free plan to configure SMTP. you can use below plugin to configure:

https://marketplace.magento.com/sendgrid-email-delivery-simplified.html

 

Kudos and accept as a solution, if issue fixed. Cheers coding

Manish Mittal
https://www.manishmittal.com/

Re: Magento 2 Email not Sending

Hi,

 

php mail function is working fine.

 

Im using Vps hosting and magento 2.3 which has host and port filled out.

But No mail transaction is happening. What might me the cause?

 

 

Re: Magento 2 Email not Sending

@gokul_k  please check your cron_schedule for job_code "sales_send_order_emails".Due to old raw data, all the new status might be in pending status.

Re: Magento 2 Email not Sending

Have you find any solution? because i'm also using the VPS hosting and Magento 2.3.4 and facing the same issue.

Re: Magento 2 Email not Sending

Have you find any solution? because i'm facing the same issue with VPS hosting and magento 2.2.4