Why erpnext take about 5 minutes to send email

You could write a scheduler Server Script to flush the email queue on any occation that you wish.

Check scheduler_tick_interval value on site_config.json
https://frappeframework.com/docs/user/en/basics/site_config

Does the same apply for receiving emails? I noticed that I am able to receive emails in my inbox in erpnext 5-10 minutes later than in my normal email program inbox. Is a different schedule causing this delay?

To answer my own question, yes it does.

Thanks to this post I was able to increase the scheduler to pulling emails every minute instead of every 5-10 minutes:


# Emails will be pulled every minute instead of every 5-10 minutes, if you change this use bench restart and bench migrate
scheduler_events = {
    "cron": {
        "* * * * *": [
            "frappe. email. doctype.email_account.email_account.pull",
            "frappe. email. doctype. email_account.email_account.notify_unreplied",
            "frappe.utils.global_search. sync_global_search",
            "frappe.monitor.flush",
            "frappe.email.doctype.email_account.email_account.pull",
        ],
    },
    "all": [
        "frappe.email.queue.flush",
    ]
}

Don’t forget to use bench restart and bench migrate after editing your hooks.py

1 Like