Ruby on rails 设计,没有电子邮件
我安装了这个装置 我运行rails server-e开发,并在config/environments中设置这一行:Ruby on rails 设计,没有电子邮件,ruby-on-rails,devise,Ruby On Rails,Devise,我安装了这个装置 我运行rails server-e开发,并在config/environments中设置这一行: config.action_mailer.default_url_options = {:host => 'localhost:3000'} 迪维斯说: message with a confirmation link has been sent to your email address. Please open the link to activate yo
config.action_mailer.default_url_options = {:host => 'localhost:3000'}
迪维斯说:
message with a confirmation link has been sent to your email address. Please open the link to activate your account.
但是我没有收到任何邮件
您觉得怎么样?将这些行添加到您的
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 }
config.action\u mailer.delivery\u method=:smtp
config.action\u mailer.smtp\u设置={
:address=>“smtp.gmail.com”,
:端口=>587,
:domain=>“baci.lindsaar.net”,
:user_name=>“”,
:密码=>'',
:身份验证=>“普通”,
:enable_starttls_auto=>true}
有关发送和设置电子邮件的更多信息您是否在
development.rb
中设置了smtp配置?无如何执行此操作?啊,我又加了一行:config.mailer\u sender=”myapp@mail.de“在设计中。非常感谢。是否可以在不注册根用户的情况下默认设置登录?您可以手动创建用户u=user.create(:email=>)abc@xyz.com“,:password=>“123456”,:password\u confirmation=>“123456”)
然后u.confirm代码>无需单击链接即可完成注册