# encoding: utf-8 # # = Resent-Bcc Field # # The Resent-Bcc field inherits resent-bcc StructuredField and handles the # Resent-Bcc: header field in the email. # # Sending resent_bcc to a mail message will instantiate a Mail::Field object that # has a ResentBccField as its field type. This includes all Mail::CommonAddress # module instance metods. # # Only one Resent-Bcc field can appear in a header, though it can have multiple # addresses and groups of addresses. # # == Examples: # # mail = Mail.new # mail.resent_bcc = 'Mikel Lindsaar , ada@test.lindsaar.net' # mail.resent_bcc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] # mail[:resent_bcc] #=> '# '# '# 'Resent-Bcc: Mikel Lindsaar , ada@test.lindsaar.net\r\n' # mail[:resent_bcc].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' # mail[:resent_bcc].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] # mail[:resent_bcc].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] # require 'mail/fields/common/common_address' module Mail class ResentBccField < StructuredField include Mail::CommonAddress FIELD_NAME = 'resent-bcc' CAPITALIZED_FIELD = 'Resent-Bcc' def initialize(value = nil, charset = 'utf-8') self.charset = charset super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, value), charset) self.parse self end def encoded do_encode(CAPITALIZED_FIELD) end def decoded do_decode end end end