docassemble icon indicating copy to clipboard operation
docassemble copied to clipboard

Cannot send emails

Open EricAtORS opened this issue 4 years ago • 3 comments

Hi,

I'm trying out docassemble and I'm having issues sending out emails. I see this error in the worker logs:

[2021-11-09 16:15:46,412: WARNING/ForkPoolWorker-2] Starting to send
[2021-11-09 16:15:49,054: WARNING/ForkPoolWorker-2] SMTPServerDisconnected: please run connect() first
[2021-11-09 16:15:49,057: INFO/ForkPoolWorker-2] Task docassemble.webapp.worker.email_attachments[6510ea24-8d30-47f3-be33-1ef67be1f28e] succeeded in 2.6506294505670667s: <docassemble.base.functions.ReturnValue object at 0x7f739c9e0100>

Am I doing something wrong?

EricAtORS avatar Nov 09 '21 21:11 EricAtORS

The default method of sending e-mail, through SMTP, tends to get blocked by anti-spam measures. The only reliable way to send e-mail these days is by signing up with an e-mail service. See https://docassemble.org/docs/config.html#mail

jhpyle avatar Nov 09 '21 21:11 jhpyle

@jhpyle Thanks for the quick reply. I have done that. I have it configured to send through gmail. I tested it outside of docassemble and it works, but it doesn't work in docassemble.

Is there a way to produce a more verbose log for the worker?

EricAtORS avatar Nov 09 '21 21:11 EricAtORS

You'll want to test it from the same machine that is hosting docassemble to see if something between the host machine and gmail is blocking the connection. It is important to get all the mail parameters right, including port number and TLS vs SSL. Even the sender line might get inspected by a firewall (I'm not sure of that, but SMTP is pretty aggressively policed). I don't know of any way to get a more verbose log.

jhpyle avatar Nov 09 '21 22:11 jhpyle

I am closing this issue because it hasn't had any activity in a long time.

jhpyle avatar Aug 13 '22 14:08 jhpyle