【发布时间】:2011-09-28 09:53:39
【问题描述】:
如何发送带有密件抄送标头的电子邮件?我按照 ruby on rails 指南设置了:bcc => "email@email.com",但它不起作用。
谢谢
由腐蚀编辑 这是我尝试过的代码:
def booking_confirmed_email(booking)
@booking = booking
mail(:to => booking.contact_email,
:bcc => "my@email.com",
:subject => "Congratulations, #{booking.contact_name}!")
end
也试过了:
def booking_confirmed_email(booking)
@booking = booking
mail(:to => booking.contact_email,
:bcc => ["my@email.com"],
:subject => "Congratulations, #{booking.contact_name}!")
end
无济于事
【问题讨论】:
-
我也有同样的问题,密件抄送不起作用
-
您是说它“不起作用”是因为它没有出现在开发环境的登录中,还是您在生产模式下没有收到任何电子邮件(实际交付)?我已经看到在没有交付的开发模式下,BCC 不会打印在日志中。
-
这仍然不起作用。我在 Rails 3.1.4 和 actionmailer 3.1.4 上。有人找到解决方案了吗?
-
您在使用 Amazon SES 吗?可能是他们的问题:github.com/drewblas/aws-ses/issues/16
-
@AdityaSanghi - 你提出了一个很好的观点。我认为我的
:bcc声明不起作用,因为我在开发日志中没有看到适当的条目。它运行正常,只是没有显示在日志中。
标签: ruby-on-rails-3 actionmailer