I want to test Devise’s
confirmable feature in local development, so I need
a way to locally send & receive emails. Got this technique from this post.
I’d like to paste it here.
- Make sure you include confirmable in Model.devise call
- Make sure you add confirmable to the user migration
- Generate the devise views (ps. I found that this step is unnecessary)
- Add the following config lines in
- To test the setup in development install the mailcatcher gem, that you will use as a SMTP server in development, catching all incoming mails and displaying them on localhost:1080
Once installed start the mailcatcher server with the command
A toy SMTP server will be running on port 1025 catching and displaying emails on HTTP port 1080.