Emails are not being sent

Hello all,

I have setup email account (Hostgator SMTP server) on my server setup but emails are not being sent also any error is not thrown (Frappe version - v6.15.2).

So, for testing purpose I have checked the same email setting with another setup on different machine, emails are being sent from that setup (Frappe version - 6.27). Also I have checked email setting with thunderbird (email application) that also works fine.

Then I tried my Gmail credential on my server setup,then i am able to send emails.So for Gmail settings it is working fine.

Then for debugging purpose, I have done following steps on my server.

  1. I tried bench console command and used frappe.sendmail function but emails are not being sent and no error thrown.
  2. Also i have debugged in in frappe app & checked the response of below line
    self._sess.login((self.login or “”).encode(‘utf-8’),(self.password or “”).encode(‘utf-8’))
    It shows (235, ‘Authentication succeeded’).I think so my email settings are fine.
  3. Then lastly i tried using python interactive prompt and imported smtplib & used sendmail function of smtplib but still email are not being sent & no error this time also. And tried same procedure with my gmail credential & email goes without any issue.
  4. I have also checked in Spam section but did not found any email.

So, right now i am unable to debug this issue. Please help or share any hint for debugging that might be useful.


@suyash maybe your background workers are not setup correctly

Check bench doctor for their status

Also see Scheduler Log and Bulk Email from within the UI.

@rmehta Thanks for the reply.
After sending new mail from bench console checked output of bench doctor command .
It shows -

Workers online: True Pending tasks 0 Timed out locks:

Also checked the Scheduler Log & Bulk Email from the application but there is no latest entry showing the failure of email sending.