我刚遇到一个问题,花了几个小时但却找不到根本原因。
如果我没有添加bcc
选项,但是当我添加密送时,邮件发送工作正常,
def test_email
mail :to => 'recipient@xyz.com',
:subject => 'Sample test',
:bcc => ['bcc@xyz.com']
end
它会向none
发送电子邮件,并将recipient@xyz.com
添加为bcc
。
这是控制台输出,
Mailer.test_email.deliver
#<Mail::Message:63045380, Multipart: true, Headers: <Date: Mon, 02 Jun 2014 13:03:02 +0000>, <From: hostmail@sample.dk>, <To: >, <Cc: >, <Bcc: ["recipient@xyz.com"]>, <Message-ID: <538c760686568_45b9a1001872969@DANVA-test-NAGIOS-monitor.mail>>, <Subject: Sample test>, <Mime-Version: 1.0>, <Content-Type: multipart/alternative; boundary="--==_mimepart_538c76063914_45b9a1001872662"; charset=UTF-8>, <Content-Transfer-Encoding: 7bit>, <X-Auto-Response-Suppress: OOF>, <Auto-Submitted: auto-generated>>
我正在使用Rails 3.2.8
和ruby 1.9.3p545
。
我想解决这个问题?