Human input node can't send Email #32572
Replies: 2 comments
-
|
This is a known issue caused by Python's smtplib using the Docker container's internal hostname/IP in the SMTP HELO command, which strict SMTP servers reject. Fix: Add SMTP_LOCAL_HOSTNAME=mail.yourdomain.comThis setting was introduced in PR #30975 specifically to address this issue. The Human Input node's SMTP client uses this setting, while the Email plugin handles SMTP connections differently, which explains why the plugin works but the Human Input node fails. After adding the environment variable, restart your Dify containers for the change to take effect. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
It works, Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
Upgraded to version 1.13. I tested the human input node by using email to send the form, but failed to send it and received a system error. I carefully checked the SMTP parameters in the .env configuration file and found no issues. Additionally, when I use the Email plugin alone, I can send emails successfully.
The following is the error log information I captured:
[channel=by-dev-rootcoord-dml_3_459022512899080766v0] ["# of unflushed segments"=0] ["# of flushed segments"=1] ["# of dropped segments"=0] ["# of indexed segments"=0] ["# of l0 segments"=0] ["# of check point"=2026/02/25 07:59:26.942 +00:00] ["# of delete check point"=2026/02/25 07:59:26.942 +00:00] api-1 | 2026-02-25 07:59:58.119 ERROR [Dummy-3] [smtp.py:52] cf4fed82291750588264325dcd200a89 - SMTP error occurred api-1 | Traceback (most recent call last): api-1 | File "/app/api/libs/smtp.py", line 42, in send api-1 | smtp.login(self.username, self.password) api-1 | File "/usr/local/lib/python3.12/smtplib.py", line 714, in login api-1 | self.ehlo_or_helo_if_needed() api-1 | File "/usr/local/lib/python3.12/smtplib.py", line 614, in ehlo_or_helo_if_needed api-1 | raise SMTPHeloError(code, resp) api-1 | smtplib.SMTPHeloError: (501, b'Syntax: HELO hostname') api-1 | 2026-02-25 07:59:58.156 ERROR [Dummy-3] [app.py:875] cf4fed82291750588264325dcd200a89 - Exception on /console/api/apps/f2e22544-2a07-43e1-bbaa-f823675338f5/workflows/draft/human-input/nodes/1771992872009/delivery-test [POST] api-1 | Traceback (most recent call last): api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request api-1 | rv = self.dispatch_request() api-1 | ^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper api-1 | resp = resource(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return] api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request api-1 | resp = meth(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/wraps.py", line 230, in decorated api-1 | return view(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/libs/login.py", line 84, in decorated_view api-1 | return current_app.ensure_sync(func)(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/wraps.py", line 47, in decorated api-1 | return view(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/app/wraps.py", line 62, in decorated_view api-1 | return view_func(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/wraps.py", line 324, in decorated_function api-1 | return f(*args, **kwargs) api-1 | ^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/controllers/console/app/workflow.py", line 673, in post api-1 | workflow_service.test_human_input_delivery( api-1 | File "/app/api/services/workflow_service.py", line 967, in test_human_input_delivery api-1 | test_service.send_test(context=context, method=delivery_method) api-1 | File "/app/api/services/human_input_delivery_test_service.py", line 117, in send_test api-1 | return self._registry.dispatch(context=context, method=method) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/services/human_input_delivery_test_service.py", line 99, in dispatch api-1 | return handler.send_test(context=context, method=method) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/services/human_input_delivery_test_service.py", line 166, in send_test api-1 | mail.send( api-1 | File "/app/api/extensions/ext_mail.py", line 89, in send api-1 | self._client.send( api-1 | File "/app/api/libs/smtp.py", line 42, in send api-1 | smtp.login(self.username, self.password) api-1 | File "/usr/local/lib/python3.12/smtplib.py", line 714, in login api-1 | self.ehlo_or_helo_if_needed() api-1 | File "/usr/local/lib/python3.12/smtplib.py", line 614, in ehlo_or_helo_if_needed api-1 | raise SMTPHeloError(code, resp) api-1 | smtplib.SMTPHeloError: (501, b'Syntax: HELO hostname') nginx-1 | 192.168.1.205 - - [25/Feb/2026:07:59:58 +0000] "POST /console/api/apps/f2e22544-2a07-43e1-bbaa-f823675338f5/workflows/draft/human-input/nodes/1771992872009/delivery-test HTTP/1.1" 500 66 "https://api.baijue-soft.com:9443/app/f2e22544-2a07-43e1-bbaa-f823675338f5/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Edg/145.0.0.0" "-"Please help me check what went wrong. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions