ERPNext Conference 2019* ERPNext.com Blog

V11 can't suspend nor resume email queue


#1

Hello team,
There used to be an option to Suspend and Resume email queue

Now I don’t see it anymore.

Has that option been moved to somewhere else or is it a bug?
meanwhile, my I had suspended my email queue before the update which means I can’t resume it since the option isn’t available.

Installed Apps
ERPNext: v11.1.2 (master)
Frappe Framework: v11.1.2 (master)

Thanks


How to setup automatic sent in emails?
V12 error on sending email with document pdf
#2

help anyone


#3

Still to find a solution.
Now running
ERPNext: v11.1.4 (master)
Frappe Framework: v11.1.4 (master)


#4

I think you can pause individual emails still within the email queue but I appreciate this isn’t what you requested


#5

My email queue is already paused before the updates, I just want to resume the entire email queue,
For now I go to individual emails in the email queue and send it from there.


As you can imagine it’s quite a hustle, because I’m not available all the time to check the email queue
Was hoping to resume the entire queue, also be able to pause it again next time when I want to
Thanks


#6

Login via administrator, and go to JavaScript console. There, paste following to send all pending emails

frappe.db.get_list('Email Queue', {filters:{'status':'Not Sent'}, limit:100000000}).then(async res => {
	for(let i of res){
		console.log('Sending', i.name);
		await frappe.call('frappe.email.doctype.email_queue.email_queue.send_now', {
			name: i.name,
		});
	}
});

#7

Hello, what happened with this button?

I have used it a lot in the local instances also en staging instances to avoid email sending.

Can I enable it again?

Thanks


#8

Dear colleagues,

we have the same issue in v11: email queue is suspended after update and mails have to be triggered manually, the button is missing. Any fix in sight?

Another workaround seems to be to run this from the browser console (as System Manager):

 frappe.defaults.set_default("hold_queue", 0);

Note: the above command does not resolve the issue.


#9

Any update on this? We still have in v10


and in v11:

and therefore no way of resuming a paused email queue…


#10

This is only a very nasty workaround for this issue… Create a cronjob that runs

$ bench execute frappe.email.queue.flush

so for every minute:

$ sudo crontab -e
* * * * * cd /home/frappe/frappe-bench && bench execute frappe.email.queue.flush

(can actually be used to speed up the mail sending queue :wink: ) Still looking for a proper solution…


Email messages hanging in the queue for a long time
#12

Thank you!

This really helped me cos I’ve been having this issue and it’s frustrating. Hopefully we see a proper fix somewhere around


#13

FYI: This has been returned in V12.


#14

Thanks @flexy2ky, the button is there. But in an affected system, it has no effect whatsoever… still wondering if there is no proper solution around, why does the queue hang?