Message
Either returns the action if the message has just a single report, or an array of all the actions, one for each report
# File lib/mail/part.rb, line 67 def action get_return_values('action') end
Creates a new empty Content-ID field and inserts it in the correct order into the Header. The ContentIdField object will automatically generate a unique content ID if you try and encode it or output it to_s without specifying a content id.
It will preserve the content ID you specify if you do.
# File lib/mail/part.rb, line 10 def add_content_id(content_id_val = '') header['content-id'] = content_id_val end
# File lib/mail/part.rb, line 39 def add_required_fields super add_content_id if !has_content_id? && inline? end
# File lib/mail/part.rb, line 44 def add_required_message_fields # Override so we don't add Date, MIME-Version, or Message-ID. end
# File lib/mail/part.rb, line 56 def bounced? if action.is_a?(Array) !!(action.first =~ /failed/) else !!(action =~ /failed/) end end
# File lib/mail/part.rb, line 26 def cid add_content_id unless has_content_id? uri_escape(unbracket(content_id)) end
# File lib/mail/part.rb, line 52 def delivery_status_data delivery_status_report_part? ? parse_delivery_status_report : {} end
# File lib/mail/part.rb, line 48 def delivery_status_report_part? (main_type =~ /message/ && sub_type =~ /delivery-status/) && body =~ /Status:/ end
# File lib/mail/part.rb, line 79 def diagnostic_code get_return_values('diagnostic-code') end
# File lib/mail/part.rb, line 75 def error_status get_return_values('status') end
# File lib/mail/part.rb, line 71 def final_recipient get_return_values('final-recipient') end
Returns true if the part has a content ID field, the field may or may not have a value, but the field exists or not.
# File lib/mail/part.rb, line 16 def has_content_id? header.has_content_id? end
# File lib/mail/part.rb, line 35 def inline? header[:content_disposition].disposition_type == 'inline' if header[:content_disposition] end
# File lib/mail/part.rb, line 20 def inline_content_id # TODO: Deprecated in 2.2.2 - Remove in 2.3 STDERR.puts("Part#inline_content_id is deprecated, please call Part#cid instead") cid end
# File lib/mail/part.rb, line 83 def remote_mta get_return_values('remote-mta') end
Generated with the Darkfish Rdoc Generator 2.