Hi, I’m new to Discourse and I already searched for I’m looking for.
I’m going to make some plugins and I need to create users to test it. I’m trying to creating users with temporary emails, but Discourse never send a email confirmation. It’s happening due to localhost? I don’t know.
I have followed this Install Discourse on Ubuntu or Debian for Development and my Discourse forum is running perfectly. I tried to create a user with RAILS_ENV=development bundle exec rake admin:create, but I can’t login since I have to confirm the email. How can I create a user with verified email? Thank you.
AI-generated summary
In a development environment, Lotts is trying to create users with verified emails for plugin testing but can’t receive confirmation emails. supermathie suggests using MailCatcher to intercept and view emails locally via http://0.0.0.0:1080/, which resolves the issue. Lotts then asks if bundle exec sidekiq is necessary — blake confirms it’s required to process background jobs like email delivery. Additionally, LeoMcA offers a development shortcut: impersonating any user by visiting /session/:username/become (e.g., http://localhost:3000/session/test1/become) to bypass email verification entirely. This thread provides both email simulation and direct login workarounds for local Discourse development.
Did you run mailcatcher as specified in that topic?
When you do, it’ll receive email sent to it by your development install and you can view it in a web browser.
→ mailcatcher --http-ip 0.0.0.0
Starting MailCatcher
==> smtp://127.0.0.1:1025
/home/michael/.rvm/gems/ruby-2.6.2@discourse/gems/thin-1.5.1/lib/thin/server.rb:104: warning: constant ::Fixnum is deprecated
==> http://0.0.0.0:1080/
*** MailCatcher runs as a daemon by default. Go to the web interface to quit.
I didn’t know about it (the 0.0.0:1080 thing). Thank you for your quick answer.
Is “bundle exec sidekiq” necessary? What is this for?
Yep. It is for running background jobs, like sending email.
You can also login as any user in development mode using the following path:
/session/:username/become
So if you want to log in to a user with “test1” as a username your URL will look something like:
http://localhost:3000/session/test1/become
