[Ruby] ar_mailer including bcc headers
Eric Hodel
drbrain at segment7.net
Mon Jul 30 10:56:27 PDT 2007
PS: Don't top-post
On Jul 30, 2007, at 03:56, Victor Cosby wrote:
> If I grab the destinations first within ARMailer, then set the TMail
> object's bcc to nil, the message isn't created with the Bcc header but
> all messages intended for Bcc recipients get created. If I nil out the
> mail's bcc attribute before I deliver it, then of course they don't.
>
> In other words:
>
> def perform_delivery_activerecord(mail)
> destinations = mail.destinations.dup
> mail.bcc = nil
> destinations.each do |destination|
> @@email_class.create :mail => mail.encoded, :to => destination,
> :from => mail.from.first
> end
> end
>
> Do you think this is something I should submit as a patch to ar_mailer
> or is there ever a case where ar_mailer would want to include a Bcc
> header? Since mails sent this way expose the entire recipient list,
> seems to defeat the purpose. I still haven't managed to track down how
> ActiveMailer avoids sending the Bcc header but will keep poking.
Looks great! Please submit a patch. The way ar_mailer performs
deliveries, stripping the Bcc header looks like the way to go.
> As for using example.com for tests, I agree. That test method I
> referred to is from ActionMailer's own test suite. :)
--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars
More information about the Ruby
mailing list