-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Bug: Self Hosted: In the "Forgot Password" flow, password reset email is not sent #1762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am also a self-hosted user and I had the same problem and couldn't receive verification emails when I changed my account email in the new version. |
In order for self hosted emails to work, you need to configure your instance with the following environment variables and restart it: config.action_mailer.default_url_options = { host: ENV["APP_DOMAIN"] }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: ENV["SMTP_ADDRESS"],
port: ENV["SMTP_PORT"],
user_name: ENV["SMTP_USERNAME"],
password: ENV["SMTP_PASSWORD"],
tls: ENV["SMTP_TLS_ENABLED"] == "true"
} We likely need to change the UI/UX for this as most self-hosted users will not have this setup by default. It's probably not the correct flow for us to use here. Thoughts and ideas from the community welcomed here—we won't be able to work on this internally right now due to prioritization. |
Just to be clear. |
As long as these can be documented in the .env - I think the community can help out those that are struggling. The .env.example does have this block (which I do have configured, but might need to update the instructions):
|
I made this work. In case someone is wondering how to do it. I am using mailtrap especially but the variables are what matters here. What did the trick was changing the TLS to False and also adding APP_DOMAIN which is not in the .env.example file. Also, I don't know if I have to configure EMAIL_SENDER differently.
|
I also filled all the variables @villancikos wrote, but setting TLS to False leads to this error: and setting it to true leads to this error: for information I have force rail SSL to false because I am using a reverse proxy (so I dont need SSL between rails and ly reverse proxy) thank you for your help ! |
Would be nice to get this added into the GUI |
I use self-host with brevo, it doesnt work for me. sadly |
Where did this bug occur? (required)
Please note, if you are reporting a bug with sensitive data, please open an Intercom chat from within the app for help
Describe the bug
If a user goes through the "Forgot Password" flow, enters a valid and known email address, clicks on "Reset Password", gets to the confirmation page, however, the password reset email is not sent.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The user should receive an email to reset their password.
Screenshots / Recordings
In the Logs, you will see
I, [2025-01-31T23:59:53.503342 #1] INFO -- : [ActiveJob] [ActionMailer::MailDeliveryJob] [xxx] Performing ActionMailer::MailDeliveryJob (Job ID: xxx) from GoodJob(default) enqueued at 2025-01-31T23:59:53.334973727Z with arguments: "PasswordMailer", "password_reset", "deliver_now", {args: [], params: {user: #<GlobalID:0x0 @uri=#<URI::GID gid://maybe/User/xxx>>, token: "xxx"}}
I, [2025-01-31T23:59:53.511952 #1] INFO -- : [ActiveJob] [ActionMailer::MailDeliveryJob] [xxx] Rendered layout layouts/mailer.html.erb (Duration: 3.1ms | GC: 0.0ms)
E, [2025-01-31T23:59:53.513730 #1] ERROR -- : [ActiveJob] [ActionMailer::MailDeliveryJob] [xxx] Error performing ActionMailer::MailDeliveryJob (Job ID: xxx) from GoodJob(default) in 21.38ms: ActionView::Template::Error (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true):
The text was updated successfully, but these errors were encountered: