Class: Mail::Message
Relationships & Source Files | |
Inherits: | Object |
Defined in: | actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, actionmailbox/lib/action_mailbox/mail_ext/recipients.rb |
Instance Method Summary
Instance Method Details
#address_list(obj) (private)
[ GitHub ]# File 'actionmailbox/lib/action_mailbox/mail_ext/addresses.rb', line 34
def address_list(obj) if obj.respond_to?(:element) # Mail 2.8+ obj.element else # Mail <= 2.7.x obj&.address_list end end
#bcc_addresses
[ GitHub ]# File 'actionmailbox/lib/action_mailbox/mail_ext/addresses.rb', line 21
def bcc_addresses Array(address_list(header[:bcc])&.addresses) end
#cc_addresses
[ GitHub ]# File 'actionmailbox/lib/action_mailbox/mail_ext/addresses.rb', line 17
def cc_addresses Array(address_list(header[:cc])&.addresses) end
#from_address
[ GitHub ]# File 'actionmailbox/lib/action_mailbox/mail_ext/addresses.rb', line 5
def from_address address_list(header[:from])&.addresses&.first end
#recipients
[ GitHub ]#recipients_addresses
[ GitHub ]# File 'actionmailbox/lib/action_mailbox/mail_ext/addresses.rb', line 9
def recipients_addresses to_addresses + cc_addresses + bcc_addresses + x_original_to_addresses + x_forwarded_to_addresses end
#to_addresses
[ GitHub ]# File 'actionmailbox/lib/action_mailbox/mail_ext/addresses.rb', line 13
def to_addresses Array(address_list(header[:to])&.addresses) end