Forget Password use smtp to send email #6634

Closed
opened 2026-02-21 18:16:38 -05:00 by yindo · 3 comments
Owner

Originally created by @bingbing6 on GitHub (Nov 8, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.11.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image
Follow this configuration and restart docker, no mail received

✔️ Expected Behavior

get emails

Actual Behavior

Follow this configuration and restart docker, no mail received

Originally created by @bingbing6 on GitHub (Nov 8, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.11.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![image](https://github.com/user-attachments/assets/988fafdd-70bf-4f9a-8d6b-9c7506d686a2) Follow this configuration and restart docker, no mail received ### ✔️ Expected Behavior get emails ### ❌ Actual Behavior Follow this configuration and restart docker, no mail received
yindo added the 🐞 bug label 2026-02-21 18:16:38 -05:00
yindo closed this issue 2026-02-21 18:16:38 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 8, 2024):

I found a similar unsolved discussion that might be relevant to your issue: Why this not work, which was last updated on September 5, 2024 [1].

For your specific issue with SMTP configuration in Dify version 0.11.0, ensure that you have correctly set the Mail parameters in the .env file. Here is a sample configuration:

MAIL_TYPE: ''
MAIL_DEFAULT_SEND_FROM: 'YOUR EMAIL FROM (eg: no-reply <no-reply@dify.ai>)'
SMTP_SERVER: 'your.smtp.server'
SMTP_PORT: 465
SMTP_USERNAME: 'your_smtp_username'
SMTP_PASSWORD: 'your_smtp_password'
SMTP_USE_TLS: 'true'
SMTP_OPPORTUNISTIC_TLS: 'false'

Make sure to replace 'your.smtp.server', 'your_smtp_username', and 'your_smtp_password' with your actual SMTP server details. After making these changes, restart the service using:

docker compose down
docker compose up -d

If you still do not receive the emails, verify that the email service is functioning correctly and check if the email has been placed in the spam folder [2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 8, 2024): <!-- Answer --> I found a similar unsolved discussion that might be relevant to your issue: [Why this not work](https://github.com/langgenius/dify/discussions/8006), which was last updated on September 5, 2024 <sup>[[1]](https://github.com/langgenius/dify/discussions/8006)</sup>. For your specific issue with SMTP configuration in Dify version 0.11.0, ensure that you have correctly set the `Mail` parameters in the `.env` file. Here is a sample configuration: ```yaml MAIL_TYPE: '' MAIL_DEFAULT_SEND_FROM: 'YOUR EMAIL FROM (eg: no-reply <no-reply@dify.ai>)' SMTP_SERVER: 'your.smtp.server' SMTP_PORT: 465 SMTP_USERNAME: 'your_smtp_username' SMTP_PASSWORD: 'your_smtp_password' SMTP_USE_TLS: 'true' SMTP_OPPORTUNISTIC_TLS: 'false' ``` Make sure to replace `'your.smtp.server'`, `'your_smtp_username'`, and `'your_smtp_password'` with your actual SMTP server details. After making these changes, restart the service using: ```bash docker compose down docker compose up -d ``` If you still do not receive the emails, verify that the email service is functioning correctly and check if the email has been placed in the spam folder <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/faqs.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@bingbing6 commented on GitHub (Nov 8, 2024):

I followed this. I tried 465 and 25, and it didn't work

@bingbing6 commented on GitHub (Nov 8, 2024): I followed this. I tried 465 and 25, and it didn't work
Author
Owner

@LvDian666 commented on GitHub (Feb 27, 2025):

Try configuring MAIL_DEFAULT_SEND_FROM in the format of Name <email address>, for example: Jack <123@456.com>. The email address must match the SMTP_USERNAME, otherwise, the email will fail to send.

@LvDian666 commented on GitHub (Feb 27, 2025): Try configuring MAIL_DEFAULT_SEND_FROM in the format of Name `<email address>`, for example: `Jack <123@456.com>`. The email address must match the SMTP_USERNAME, otherwise, the email will fail to send.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6634