diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-15 13:17:56 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-15 13:17:56 +0100 |
commit | c905fce35f51b00933ab06725fc3548036caa07c (patch) | |
tree | ac7da76b62b7a264558cd8a3221607947d3a9231 | |
parent | a5a9156b4ebab1e0f441b584f86be7380b21353b (diff) | |
download | rails-c905fce35f51b00933ab06725fc3548036caa07c.tar.gz rails-c905fce35f51b00933ab06725fc3548036caa07c.tar.bz2 rails-c905fce35f51b00933ab06725fc3548036caa07c.zip |
Add message_id to AM payload and don't send bcc and cc if they were not sent.
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 91a0007084..5b4a8c0751 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -426,15 +426,14 @@ module ActionMailer #:nodoc: end def set_payload_for_mail(payload, mail) #:nodoc: - payload[:subject] = mail.subject - payload[:to] = mail.to - payload[:from] = mail.from - payload[:bcc] = mail.bcc - payload[:cc] = mail.cc - payload[:reply_to] = mail.reply_to - payload[:date] = mail.date - payload[:body] = mail.body.encoded - payload[:mail] = mail.encoded + payload[:message_id] = mail.message_id + payload[:subject] = mail.subject + payload[:to] = mail.to + payload[:from] = mail.from + payload[:bcc] = mail.bcc if mail.bcc.present? + payload[:cc] = mail.cc if mail.cc.present? + payload[:date] = mail.date + payload[:mail] = mail.encoded end private |