我已经配置了我的gmail变量,以便从我的应用发送测试邮件:
ActionMailer::Base.smtp_settings = {
:address => 'smtp.gmail.com',
:domain => 'mail.google.com',
:port => 587,
:user_name => 'enriqueisasi@gmail.com',
:password => 'mypass',
:authentication => :plain,
:enable_starttls_auto => true
}
我可以在我的日志中查看其工作情况,但我仍然看不到Gmail中的电子邮件:
Sent mail to enriqueisasi@gmail.com (219.7ms)
Date: Mon, 05 Sep 2016 01:32:55 +0200
From: Your Mailer <hola@benditapizza.es>
To: Me <enriqueisasi@gmail.com>
Message-ID: <57ccaf2742bc0_3d03ff35f488dec6265@MacBook-Pro-de-Enrique-2.local.mail>
Subject: Mensaje de adfadf
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
答案 0 :(得分:2)
我猜您错过了在development.rb
config.action_mailer.perform_deliveries = true
默认情况下为false,阻止从开发环境发送邮件