Closed jingzl closed 11 hours ago
To address the issue of not receiving emails when adding a member in Dify version 0.12.1, consider the following potential configuration issues:
MAIL_TYPE Not Set: Ensure that the MAIL_TYPE
is correctly set in your configuration. If it is not set, the mail client will not be initialized.
API Key for Resend: Since you are using the "resend" mail type, verify that the RESEND_API_KEY
is correctly set. If it is not set, emails will not be sent.
SMTP Configuration: Double-check that SMTP_SERVER
and SMTP_PORT
are correctly configured. These are essential for SMTP mail type.
TLS Configuration: Ensure that if SMTP_OPPORTUNISTIC_TLS
is enabled, SMTP_USE_TLS
should also be enabled. Otherwise, it may cause issues.
Default Send From Address: Make sure MAIL_DEFAULT_SEND_FROM
is set if no from_
address is provided when sending the email.
Recipient, Subject, and HTML Content: Ensure that the to
, subject
, and html
parameters are provided when calling the send
method.
After making any changes to the configuration, restart the service to apply the changes using:
docker compose down
docker compose up -d
Additionally, check if the email service is functioning correctly and verify whether the email has been placed in the trash or spam folder [1][2].
To continue talking to Dosu, mention @dosu.
MAIL_DEFAULT_SEND_FROM=no-reply@dify.ai
You need to change this to your own email sender. Eg. If you choose the SMTP, set it to xxxx@qq.com
.
If you are using resend, make sure you have passed the domain validation according to their docs.
Self Checks
Dify version
0.12.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
When adding a member in the settings and entering the email address, the email is not received.
.env config:
Regardless of choosing to resend or using SMTP, the email is not received.
✔️ Expected Behavior
the email is received.
❌ Actual Behavior
Regardless of choosing to resend or using SMTP, the email is not received.