[英]Devise, no E-Mails
I installed devise. 我安装了设计。
I run rails server -e development and set this line in config/environments: 我运行rails server -e development并在config / environments中设置这一行:
config.action_mailer.default_url_options = {:host => 'localhost:3000'}
Devises says: 戴维斯说:
message with a confirmation link has been sent to your email address. Please open the link to activate your account.
But I didn't receive any mail. 但我没有收到任何邮件。
What do you think? 你怎么看?
Add these lines to your development.rb
file 将这些行添加到
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 }
More info about sending and setting up email here 有关在此处发送和设置电子邮件的详细信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.