cancel
Showing results for 
Search instead for 
Did you mean: 

How to send new order email when order is created in admin

Re: How to send new order email when order is created in admin

@rui_silva1 

 

You can disable sending email for admin and frontend from admin [Store > Configuration > Sales > Sales Email] of order confirmation and later you can use this event observer.

Check my answer from here how to send email for this event :

https://community.magento.com/t5/Magento-2-x-Programming/Stop-order-email-confirmation-to-customer-o...

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: How to send new order email when order is created in admin

Hey @gaurav_harsh1 and @Nishu Jindal 

 

I tried made an invoice and the Invoice email is not sent too, I checked the logs and in debug.log the only thing that showed there when I tried to send the email was

 

main.DEBUG: cache_invalidate:  {"method":"POST","url":"base_url/admin/sales/order_invoice/save/order_id/74042/key/a5691a6cbb4879becd1e8f0be36dfb64aa2cf20715f361d0a33940ff5515499b/","invalidateInfo":{"tags":["rma_order_status_history"],"mode":"matchingAnyTag"}} []
main.DEBUG: cache_invalidate:  {"method":"POST","url":"base_url/admin/sales/order_invoice/save/order_id/74042/key/a5691a6cbb4879becd1e8f0be36dfb64aa2cf20715f361d0a33940ff5515499b/","invalidateInfo":{"tags":["rma_order_status_history_7873","FPC"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate:  {"method":"POST","url":"base_url/admin/sales/order_invoice/save/order_id/74042/key/a5691a6cbb4879becd1e8f0be36dfb64aa2cf20715f361d0a33940ff5515499b/","invalidateInfo":{"tags":["rma_order_status_history_7873","FPC"],"mode":"matchingTag"}} []

Can it be something from this? I recently upgraded from 2.2.7 to 2.3.5-p1 if it's relevant.

 

Thanks Smiley Very Happy

Re: How to send new order email when order is created in admin

Hi @rui_silva1,

 

Are you using any custom extension related to the RMA in your store?  If yes, can you please disable that extension and try your Order and Invoice Email triggered to the customer or not.

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

 

Re: How to send new order email when order is created in admin

@rui_silva1 

 

I think you're using localhost as domain, if Yes, please try to change base URL with your IP and then try.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: How to send new order email when order is created in admin

Hey @Nishu Jindal ,

 

Still the same, all goes through without errors but no email.

 

Thanks Smiley Very Happy

Re: How to send new order email when order is created in admin

Hey @gaurav_harsh1 ,

 

It's not localhost, I just changed it's a long base url because it's generated based on the environment name.

But even in that case wouldn't that "block" the frontend email sending too?

 

Thanks Smiley Very Happy

Re: How to send new order email when order is created in admin

Hey @gaurav_harsh1 and @Nishu Jindal ,

 

I tried to disable Asynchronous sending and all email were sent at the same time. There's the problem, I should've database cron_schedule and not the email log I guess.

But with this why emails from admin are becoming pending and the other don't?

 

Thanks Smiley Very Happy

Re: How to send new order email when order is created in admin

Thanks I got it.

 

The base crons from magento were not properly installed so they weren't running properly and all things were pending all the time.

Re: How to send new order email when order is created in admin

@rui_silva1 

 

So the error you shared was not related to the issue you are getting.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: How to send new order email when order is created in admin

I didn't know if it were or not, it was the only error that showed at the time I tried to send the email so I thought it could be related but it wasn't I'm getting to that error now to see what it's causing it but not related to this issue, sorry for the miss lead there!

 

Thanks for everything!