Can't for the life of me get mail to work... (Help much appreciated!)

I understand one configures an “Email Domain” with server information and then runs an “Email Account” against it. Only no mail, although appearing in communications as “sent” ever goes through.

Watching postfix’s mail.log on the mail server shows a connection when an Email Domain is saved but with “lost connection after AUTH”.

It would really help to be able to test on a lower level as one would with php -r "mail('', 'test', 'test');"

I hear there is frappe.sendmail(), how does one invoke that?



Probably there is some missconfiguration …

You can test using console if you have SSH access, or (GUI) system console (search system console on awesome bar) this way.

Hope this helps.

1 Like

Helps very much avc! I must admit I didn’t even know a system console existed… excellent!

Now frappe.sendmail() executes fine but even with log(text) produces no output, let alone touch the mta (tail -f mail.log).

How to I get some output or look for execution errors?

recipients = [

text = frappe.sendmail( recipients=recipients,
subject = 'test from system console',
content = 'test content'


site_config.json <= pause_scheduler = 1
That was it!

Like every good application ERPnext has its own mail queue and scheduler, the latter just didn’t ever run. If only I had known about it, fixing that issue would have been done in a jiffy!

bench enable_scheduler
a few times but the scheduler never came on. VI’ing site_config.json finally did it. That was a tough one…

1 Like

Sometimes, many years later, I find solutions to problems in my own postings.

So, kombi, if your mail does not go out with an error to the effect of “image creation failed” add a host_name to your site_config.json WITH protocol prefix (so it is actually more a URL than a host name)

"host_name": ""

1 Like

:joy: Sometimes i talk too with my past .