设计,没有电子邮件 [英] Devise, no E-Mails
本文介绍了设计,没有电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我安装了设备。
我运行rails server -e开发并在配置/环境中设置此行:
config.action_mailer.default_url_options = {:host => 'localhost:3000'}
Devises说:
具有确认链接的
消息已发送到您的电子邮件地址。请打开链接以激活您的帐户。
但我没有收到任何邮件。
解决方案
将这些行添加到 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}
有关发送和设置电子邮件的更多信息这里
I installed devise.
I run rails server -e development and set this line in 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
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
这篇关于设计,没有电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文