Fix Library: Checkout and orders
Order Confirmation Emails Not Sending
Last updated:
What you see
Orders come in, but customers say they never got a confirmation email.
Quick answer
If asynchronous sending is on, order emails wait for cron, so a stopped cron stops all emails. Otherwise, email may be switched off in the configuration, the server may not be allowed to send mail, or the emails go out but land in spam because SPF and DKIM are missing. Check in that order.
What usually causes it?
- Asynchronous sending is on and cron is not running
- Email communications disabled in configuration
- No working mail transport: the host blocks PHP mail and no SMTP is set up
- Emails sent but marked as spam (missing SPF, DKIM or DMARC)
How do you check it safely?
These checks only read information. Run them on staging first if you can, from the Magento root folder as the file system owner. Hosting setups differ, so paths and service names may need adjusting.
- Check asynchronous sending and whether email is disabled.
bin/magento config:show sales_email/general/async_sending bin/magento config:show system/smtp/disableIf config:show says the path doesn't exist, the setting is simply on its default value. That is not an error.
- See whether Magento marked recent order emails as sent.
SELECT increment_id, created_at, send_email, email_sent FROM sales_order ORDER BY entity_id DESC LIMIT 10; - Check the cron job that sends queued order emails.
SELECT status, scheduled_at, executed_at, messages FROM cron_schedule WHERE job_code = 'sales_send_order_emails' ORDER BY scheduled_at DESC LIMIT 5; - Check SPF, DKIM and DMARC for your sending domain.
dig +short TXT example.com dig +short TXT _dmarc.example.com
How do you fix it?
These steps change your store. Run them on staging first, with a backup of code and database.
- Fix cron if it is not running (see the cron fix page), or turn off asynchronous sending.
- Turn email back on if it was disabled, for example after copying the database to staging.
bin/magento config:set system/smtp/disable 0 - Send through an authenticated SMTP service or a transactional email provider instead of PHP mail.
- Add SPF and DKIM records for the sending service, then a DMARC record.
When should you call an expert?
Call an expert if emails are marked as sent but never arrive, or if only some order emails go missing.
Need it fixed today?
I can look at it with you. Book a 20 minute call, or if the store is down, see emergency Magento support.
Further reading
FAQ
Common questions.
Can I resend a missing order confirmation?
Yes. Open the order in the admin and use Send Email. Fix the cause first, or the resend fails the same way.
Why did emails stop after copying the site to staging?
Teams often disable email on staging so customers are not emailed by mistake. If that setting reaches production, live emails stop too.
Related
Rather have it fixed for you?
Send a few lines about the problem, or book a 20 minute call. You get an honest read and a fixed quote.