设计,没有电子邮件

时间:2013-02-18 17:37:30

标签: ruby-on-rails devise

我安装了设计。

我运行rails server -e development并在config / environments中设置这一行:

config.action_mailer.default_url_options = {:host => 'localhost:3000'}

Devises说:

 message with a confirmation link has been sent to your email address. Please open the      link to activate your account.

但我没有收到任何邮件。

您怎么看?

1 个答案:

答案 0 :(得分:3)

将这些行添加到development.rb文件

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address              => "smtp.gmail.com",
  :port                 => 587,
  :domain               => 'baci.lindsaar.net',
  :user_name            => '<username>',
  :password             => '<password>',
  :authentication       => 'plain',
  :enable_starttls_auto => true  }

有关发送和设置电子邮件here

的详细信息