In development mode , you need to add this line to config/environments/development.rb
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
Then check your serverโs logs to see the mail. You should find something like this:
Submitted by devise / mailer / confirm_instructions.html.erb (19.5ms)
Sent mail example@mail.com (21951ms)
Date: Thu May 26, 2011 12:56:55 PM +0200
From: sender@mail.com
Reply to: sender@mail.com
To: example@mail.com
Message-ID: < 4dde31f7944bd_5ac277e0e4785c6@L-Portable.mail >
Subject: confirmation instructions
Mime-Version: 1.0
Content-Type: text / html;
= UTF-8 encoding
Content-Transfer-Encoding: 7bit <p>Welcome example@mail.com !</p> <p>You can confirm your account through the link below:</p> <p><a href="http://localhost:3000/users/confirmation?confirmation_token=Hi0tyRQU8cCFpAbatYFf">Confirm my account</a></p>
You also need to put this line in config/initializers/devise.rb
config.mailer_sender = " sender@mail.com "
If you REALLY do not have this mail in your logs, you can still confirm your account by taking the confirmation_token
value in your database and follow this link
http://localhost:3000/users/confirmation?confirmation_token=
And that should do the trick.
Greetings
Lucas
source share