[英]ActionMailer not sending emails in local environment
我已經配置了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
我想你錯過了在development.rb
設置此配置
config.action_mailer.perform_deliveries = true
默認情況下,此選項為false,以防止從您的開發環境發送郵件
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.