Answers.Body: <p>They changed it to use queue jobs - see here <a href="https://docs.craftcms.com/commerce/v3/order-status-emails.html#settings" rel="noreferrer">https://docs.craftcms.com/commerce/v3/order-status-emails.html#settings</a> - You can set up a cron job that runs the queue job every x mins or use this plugin <a href="https://github.com/ostark/craft-async-queue" rel="noreferrer">https://github.com/ostark/craft-async-queue</a> to automatically run the queue after Commerce send the email job to the queue.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-24T05:00:57.157Z
Answers.Text: Awesome resource on queue handling in Craft 3 here, that is definitely worth a read: https://nystudio107.com/blog/robust-queue-job-handling-in-craft-cms
Answers.UserDisplayName: Jeremy Daalder
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-17T08:00:12.943Z
Answers.LastActivityDate: 2020-06-17T08:00:12.943Z
Answers.UserDisplayName: PhilipBoomy
Answers.Body: <p>Thanks to @PhilipBoomy for his answer.  The problem were missing cron jobs.</p>
  
  <p>Additionally I want to add one more solution from the craft support team:</p>
  
  <p>If you don't have the queue set up to run automatically with a cron job or worker, you can also try adding this to your order confirmation template:</p>
  
  <pre><code>{# run queue #}
  {% do craft.app.queue.handleResponse %}
  {{ craft.app.response.content|raw }}
  </code></pre>
  
  <p>Which will run the queue over Ajax on that page.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-17T09:09:52.753Z
Answers.Text: I like that. A simple solution.
Answers.UserDisplayName: PhilipBoomy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-12T12:12:29.417Z
Answers.Text: Perfect! Thanks a lot!
Answers.UserDisplayName: outline4
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-17T08:30:17.143Z
Answers.LastActivityDate: 2020-06-17T08:30:17.143Z
Answers.UserDisplayName: pepe
Body: <p>I have an e-mail problem at Craft Commerce. 
  Emails are not sent at the time of purchase. 
  The e-mail is only sent when you log in to the backend. </p>
  
  <p>I first thought it was a server queue problem. But the support of our Nginx server could not find any error. I have also already tried out various e-mail sending options.
  Strangely enough, contact form e-mails are sent immediately and without delay. </p>
  
  <p>The problem occurred first when updating Craft Commerce. </p>
  
Tags: <plugin-craftcommerce>
Title: Craft Commerce not sending E-Mails immediately
ThreadText: # Craft Commerce not sending E-Mails immediately
  
  (Asked by: username_0 on 2020-06-17)
  
  I have an e-mail problem at Craft Commerce.
  Emails are not sent at the time of purchase.
  The e-mail is only sent when you log in to the backend.
  
  I first thought it was a server queue problem. But the support of our Nginx server could not find any error. I have also already tried out various e-mail sending options.
  Strangely enough, contact form e-mails are sent immediately and without delay.
  
  The problem occurred first when updating Craft Commerce.
  
  **Tags:** plugin-craftcommerce
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-06-17. Score: 5 | Accepted answer
  
  They changed it to use queue jobs - see here <https://docs.craftcms.com/commerce/v3/order-status-emails.html#settings> - You can set up a cron job that runs the queue job every x mins or use this plugin <https://github.com/ostark/craft-async-queue> to automatically run the queue after Commerce send the email job to the queue.
  
  > **Comments:**
  > **username_2**: Awesome resource on queue handling in Craft 3 here, that is definitely worth a read: https://nystudio107.com/blog/robust-queue-job-handling-in-craft-cms  
  
  ---
  
  ### Answer by username_0 on 2020-06-17. Score: 8
  
  Thanks to @username_1 for his answer. The problem were missing cron jobs.
  
  Additionally I want to add one more solution from the craft support team:
  
  If you don't have the queue set up to run automatically with a cron job or worker, you can also try adding this to your order confirmation template:
  
  ```
  {# run queue #}
  {% do craft.app.queue.handleResponse %}
  {{ craft.app.response.content|raw }}
  
  ```
  
  Which will run the queue over Ajax on that page.
  
  > **Comments:**
  > **username_1**: I like that. A simple solution.  
  > **username_3**: Perfect! Thanks a lot!  
  
  ---
  
  