Skip to content

BCC #54

Description

@Tensho

I was surprised, that MandrillDm::Message doesn't have #bcc method. After digging some code I noticed, that we accumulate to, cc and bcc inside #combine_address_fields and handle BCC this way. But I can't understand, what is the difference between classic bcc field and custom Mandrillbcc_address parameter?
Example:

class AlphabetMailer < ActionMailer::Base
  def a
    mail(from: 'anything@example.com',
         to: 'a.babichev@example.com',
         bcc: 'andrew.babichev@gmail.com',
         subject: 'Alpha',
         body: '',
         delivery_method: :mandrill)
  end

  def b
    mail(from: 'anything@example.com',
         to: 'a.babichev@example.com',
         bcc_address: 'andrew.babichev@gmail.com',
         subject: 'Beta',
         body: '',
         delivery_method: :mandrill)
  end
end

# AlphabetMailer.a.deliver_now and AlphabetMailer.b.deliver_now work the same as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions