Sales invoices not emailing customers after upgrade — emails stuck in queue

Hi everyone, I’m facing a problem after upgrading our ERPNext server.

  • When we submit a Sales Invoice, the system says the email is queued, but the customer never receives it.
  • The Email Queue keeps growing, and the status stays as “Not Sent.”
  • If I click “Send Now,” nothing changes.
  • Sometimes it works right after a server restart, but stops again after a while.

Our setup:

  • ERPNext v14, Ubuntu server, production setup

  • Using Gmail/Google Workspace SMTP (App Password)

  • No custom code related to email

  • How do I properly clear the stuck emails and get the queue moving again?

  • What logs or screens should I check to find the real error?

Check if Frappe worker processes are running

sudo supervisorctl status

If worker processes are stopped or restarting frequently, email sending won’t work.

To restart workers:

cd ~/frappe-bench
bench restart

Check Email Logs

ERPNext logs email sending errors in:

# For bench logs
cd ~/frappe-bench
bench --site your-site-name console

Or directly check the logs:

# Worker logs
tail -f logs/worker.error.log

# Scheduler logs (sometimes relevant)
tail -f logs/scheduler.error.log

Clear Stuck Emails

If you want to reset the queue, you have two options:

Option A — Retry individual emails

  • Go to Email Queue → select emails → Send Now

Option B — Clear the queue entirely

cd ~/frappe-bench
bench --site your-site-name execute frappe.email.queue.clear

This removes unsent emails — use only if you are okay losing queued emails.

Check Scheduler

ERPNext sends some emails via scheduler events. Make sure the scheduler is running:

bench --site your-site-name doctor

It will tell you if Redis, Workers, or Scheduler is misconfigured.

You can start a worker in foreground to see why emails fail:

bench worker
1 Like