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.
I was surprised, that
MandrillDm::Messagedoesn't have#bccmethod. After digging some code I noticed, that we accumulateto,ccandbccinside#combine_address_fieldsand handle BCC this way. But I can't understand, what is the difference between classicbccfield and custom Mandrillbcc_addressparameter?Example: