0
我只是配置电子邮件设置,并尝试在我的应用程序中注册一个新帐户。设计日志发送确认邮件在哪里?
它应该发送确认电子邮件,但没有发生任何事情,并没有显示错误。
我在哪里可以获取日志以查看配置文件中是否存在任何问题?
在development.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => 'mail.google.com',
:user_name => '[email protected]',
:password => 'password',
:authentication => 'plain',
:enable_starttls_auto => true }
编辑下面还我的配置, 最新的配置是如下:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { :host => 'smtp.gmail.com:587' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:user_name => "[email protected]",
:password => "password",
:domain => "gmail.com",
:authentication => :login }
谢谢。我可以看到你在development.log中说的话。没有错误,但我仍然没有收到邮件。 –
再次验证您的配置。参见编辑。此外,请检查您的gmail帐户中发送的邮件文件夹,看看邮件是否在那里列出。 – dexter
最后,通过以下链接解决它http://yekmer.posterous.com/devise-gmail-smtp-configuration 谢谢很多! –