<p>Simple step missing on the setup of this. I needed to actually assign this email to the status New, to send when a New order is placed, in the Order Statuses section, as per this documentation. So simply a case of RTFM:
<a href="https://craftcms.com/docs/commerce/3.x/order-status-emails.html#selecting-an-email" rel="nofollow noreferrer">https://craftcms.com/docs/commerce/3.x/order-status-emails.html#selecting-an-email</a></p>

CC BY-SA 4.0
2021-02-24T11:29:36.117Z
2021-02-24T11:42:03.400Z
2021-02-24T11:42:03.400Z
Laurence Cope
<p>I have placed a successful order in Commerce and it's settings have an email setup to send an email to the customer and use the example special/receipt email.</p>
<p>But the receipt email is not sent once the order is placed.</p>
<p>If we login to the admin and go to the order page, selecting Send Email and choosing the customer receipt then it does send it OK.</p>
<p>So the receipt email is all setup OK and sends using the function in the order screen, its just not sending after the order is placed.</p>
<p>There is no commerce.log in storage.
web.log doesn't have any logs related to commerce or the order.
There is nothing in the Queue related to this (only loads of failed &quot;Updating search indexes&quot; and &quot;Generating products sitemap&quot; which is a whole other issue).</p>
<p>Does anyone know what it could be or how I could even go about debugging this when email works and I can't find any logs about its not sending?</p>
<p>Thanks</p>

CC BY-SA 4.0
2021-02-24T01:49:06.187Z
Just a guess, and I would really expect an error then, but you might well be hitting the issue with sessions - https://craftcms.stackexchange.com/questions/35920/error-on-functions-in-queue-session-does-not-exist-in-a-console-request - as when you're accessing the order by the back end, there is a session available, but probably not when the email is being sent via a queue...see also: https://craftcms.stackexchange.com/questions/36359/error-on-functions-in-queue-session-does-not-exist-in-a-console-request/36363#36363
Jeremy Daalder
CC BY-SA 4.0
2021-02-24T11:15:58.657Z
I dont think its related to using cart in the template, as its not there. If I replace the receipt.twig content with just the word test, its still not sent. I dont get errors reported in both those if I search the logs. The only thing I have not done is log errors if its a console request. Surprised thats not done anyway.
Laurence Cope
CC BY-SA 4.0
2021-02-24T11:25:25.157Z
I've just realised in the Emails section there is no action to choose when to send this. No "On new order" action... so how does the system know to send this email on a new order? Maybe related.
Laurence Cope
CC BY-SA 4.0
2021-02-24T11:42:32.680Z
OK well thats the issue! See my answer to the fix, missed a step in the setup!
Laurence Cope
CC BY-SA 4.0
2021-02-24T20:42:21.480Z
Glad you got there - sorry, should have checked on the basics first!...the issue I described has just become my pet issue as it's cropping up a lot.
Jeremy Daalder
<plugin-craftcommerce><emails><order>
Commerce email receipt not sent after order, but manual Send Email in Order screen works
# Commerce email receipt not sent after order, but manual Send Email in Order screen works

(Asked by: username_0 on 2021-02-23)

I have placed a successful order in Commerce and it's settings have an email setup to send an email to the customer and use the example special/receipt email.

But the receipt email is not sent once the order is placed.

If we login to the admin and go to the order page, selecting Send Email and choosing the customer receipt then it does send it OK.

So the receipt email is all setup OK and sends using the function in the order screen, its just not sending after the order is placed.

There is no commerce.log in storage.
web.log doesn't have any logs related to commerce or the order.
There is nothing in the Queue related to this (only loads of failed "Updating search indexes" and "Generating products sitemap" which is a whole other issue).

Does anyone know what it could be or how I could even go about debugging this when email works and I can't find any logs about its not sending?

Thanks

**Tags:** plugin-craftcommerce, emails, order

> **Comments:**
> **username_1**: Just a guess, and I would really expect an error then, but you might well be hitting the issue with sessions - https://craftcms.stackexchange.com/questions/35920/error-on-functions-in-queue-session-does-not-exist-in-a-console-request - as when you're accessing the order by the back end, there is a session available, but probably not when the email is being sent via a queue...see also: https://craftcms.stackexchange.com/questions/36359/error-on-functions-in-queue-session-does-not-exist-in-a-console-request/36363#36363  
> **username_0**: I dont think its related to using cart in the template, as its not there. If I replace the receipt.twig content with just the word test, its still not sent. I dont get errors reported in both those if I search the logs. The only thing I have not done is log errors if its a console request. Surprised thats not done anyway.  
> **username_0**: I've just realised in the Emails section there is no action to choose when to send this. No "On new order" action... so how does the system know to send this email on a new order? Maybe related.  
> **username_0**: OK well thats the issue! See my answer to the fix, missed a step in the setup!  
> **username_1**: Glad you got there - sorry, should have checked on the basics first!...the issue I described has just become my pet issue as it's cropping up a lot.  

---

## 1 answers

### Answer by username_0 on 2021-02-24. Score: 2

Simple step missing on the setup of this. I needed to actually assign this email to the status New, to send when a New order is placed, in the Order Statuses section, as per this documentation. So simply a case of RTFM:
<https://craftcms.com/docs/commerce/3.x/order-status-emails.html#selecting-an-email>


---

