【发布时间】:2012-07-20 02:55:52
【问题描述】:
我的 prod actionmailer 有问题。我托管在 site5 共享云上。问题是我收到此错误消息。
A message that you sent using the -t command line option contained no
addresses that were not also on the command line, and were therefore
suppressed. This left no recipient addresses, and so no delivery could
be attempted.
------ This is a copy of your message, including all the headers. ------
Date: Sat, 17 Sep 2011 21:06:42 +0000
From: noreply@mydomain.com
To: myemail@mydomain.com
Message-ID: <4e750be27b3ef_4a9c159402ee91b039763@themailserver.com>
Subject: test
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
我添加了默认
default :recipient => 'noreply@mydomain.com'
但是邮件返回给我同样的错误。
我的 ActionMailer 控制器
class Emailtousers < ActionMailer::Base
default :from => "noreply@mydomain.com"
default :recipient => "noreplay@mydomain.com"
def plan_notification(resource)
@resource = resource
puts resource
mail(:to => "myemail@mydomain.com", :subject => 'test')
end
end
我错过了什么?
我跟着这个来帮助我http://edgeguides.rubyonrails.org/action_mailer_basics.html
【问题讨论】:
-
请与该域外的收件人一起尝试,并告诉我们您会收到什么
-
收件人是收件人:邮件?我已经尝试过使用另一个域和另一封电子邮件,并且默认来自获取相同的邮件.. 没有收件人消息。谢谢
-
是的,收件人是收到电子邮件的人。
-
好的,我得到了同样的东西!我的主机告诉我更改身份验证 => :login 为 :plain,但同样的事情!
标签: ruby-on-rails ruby-on-rails-3 actionmailer