mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
tools/email: overly strict email_account validation in email sending #943
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @WangYuhang-CN on GitHub (Jan 21, 2026).
Self Checks
Dify version
1.11.4
Plugin version
0.0.9
Cloud or Self Hosted
Cloud, Self Hosted (Docker)
Steps to reproduce
In the current email sending logic, there is semantic confusion in the validation of sender-related parameters.
The system defines both email_account and sender_address fields, yet the validation logic still forcibly treats email_account as a complete email address (mailbox) for validation. As a result, emails are incorrectly rejected in valid configuration scenarios.
When configured as follows:
the email sending request is rejected with the error message:
“Invalid parameter userid, the sender is not a mailbox”.
Configuration:
Output:
✔️ Error log
No response
@dosubot[bot] commented on GitHub (Jan 21, 2026):
Hi @WangYuhang-CN! I'm Dosu and I’m helping the dify-official-plugins team.
The strict validation happens because the plugin code checks if email_account is a full email address using a regex, even when sender_address is set correctly. This causes valid setups where email_account is just a username to fail with the “Invalid parameter userid, the sender is not a mailbox” error. The logic is in tools/email/tools/send_mail.py and isn’t configurable without code changes.
A recent update fixes this: PR #2381 (merged 2026-01-08) changes the validation so email_account is only checked for presence and type, not email format, and uses sender_address as the actual From address. Upgrading to a plugin version that includes this PR should resolve the issue. You can see the relevant changes and discussion in PR #2381.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@crazywoola commented on GitHub (Feb 3, 2026):
Hi @WangYuhang-CN, thanks for opening this issue.
Why this is being closed
Dify issue tracking requires English-only issue title and description for consistent collaboration.
Next steps
Please open a new issue in English and include clear details so maintainers can help efficiently.
Thanks for understanding and for your support.