Email notification taking more time how to fix this?

Hi Team,
Having some issue regarding the email notification .when i create sales order and submit it after 3,4 min the email notification receive ,same in sales invoice ,etc.
how to reduce this time ?
please help me sort out this …


I’m not sure for this kind of notification but e-mails are sent in batch each 5 minutes.
It’s also possible to send email directly with another function

1 Like

can we reduce this time ??
It possible or not?

For the batch it’s written in the source code, I don’t think it’s accessible with a variable

1 Like

i make this immediately after i click on the condition like save ,submit etc as per the Send Alert On that doctype

Signature for sendmail is here :

If you call frappe.sendmail with the delayed parameter to false it will be sent immediatly

By default all notifications are enqueued.

Queue are configured in background jobs here :

There is a default timeout of 300 seconds.

So if you want to change this behavior you will need to create custom script.