Devise not sending emails

1,354 views
Skip to first unread message

Edgar

unread,
Feb 10, 2011, 2:31:47 AM2/10/11
to Devise
everything on Devise works wonderful, for some reason I can not get
the email part working.(forgot password and confirmable)

I added this add this line to the development file
config.action_mailer.default_url_options = { :host => 'localhost:
3000' }

it say the email was send, but I never got anything
so I change this line to TRUE

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = true

this is the error I get
---
Errno::EACCES in Devise/confirmationsController#create

Permission denied - connect(2)
---

I never had to send email on rails before...is there anything else I
need to add somewhere any help will be greatly appreciated.
Edgar

App Env
Rails 3.0.3, Ruby 1.9.2p136, Windows 7

ps: Awesome Job with the Gem and the Wikis.

José Valim

unread,
Feb 10, 2011, 2:33:42 AM2/10/11
to Devise
Edgar, do you have the backtrace of the error (remember, always post
error messages with backtraces)?

Are you using an external server (like gmail) to send the e-mail? If
so, I would bet that it cannot connect to the external server for some
reason.

Edgar

unread,
Feb 10, 2011, 8:08:33 PM2/10/11
to Devise
problem fix ...
add a setup_mail.rb (config/initializers)

ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "yourdomain.com",
:user_name => "username",
:password => "password",
:authentication => "plain",
:enable_starttls_auto => true
}

ActionMailer::Base.default_url_options[:host] = "yourdomain.com"
Reply all
Reply to author
Forward
0 new messages