ActionMailer成功出站电子邮件但未收到

时间:2015-12-13 02:07:30

标签: ruby-on-rails ruby

我环顾四周寻找类似的问题,但似乎没有什么对我有用。 我正在使用ActionMailer 发送电子邮件。电子邮件出站成功,但我没有收到我的电子邮件。

我已启用POP邮件服务。

配置/环境/ development.rb

  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.smtp_settings = {
   :authentication => :plain,
   :address => "smtp.mailgun.org",
   :port => 587,
   :domain => "tvtt.co",
   :user_name => "postmaster@tvtt.co",
   :password => "password"
}
config.action_mailer.default_url_options = { :host => 'localhost:3000' }

寄件人/ notification_mailer.rb

class NotificationMailer < ActionMailer::Base
  default from: 'support@tvtt.com'

  def acquisition_email(listing)
    @neighborhood = listing.neighborhood
    @tenant_fee = listing.tenant_fee
    @listing = listing
    mail(
      to: "yseremail@gmail.com",
      subject: "List your place on tvtt!"
    )
  end

end

这是电子邮件出站的“成功”输出:

Sent mail to yseremail@gmail.com (23.1ms)
Date: Sat, 12 Dec 2015 20:05:13 -0500
From: support@tvtt.com
To: yseremail@gmail.com
Message-ID: <566cc44930cf0_64f23fc8933831dc28566@yseremail-MacBook-Pro.local.mail>
Subject: List your place on tvtt!
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable

0 个答案:

没有答案