In Files

Parent

Class/Module Index [+]

Quicksearch

Mail::Part

Public Instance Methods

action() click to toggle source
# File lib/mail/part.rb, line 37
def action
  delivery_status_data['action'].value
end
add_content_id(content_id_val = '') click to toggle source

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
add_required_fields() click to toggle source
# File lib/mail/part.rb, line 20
def add_required_fields
  add_content_id unless has_content_id?
  super
end
bounced?() click to toggle source
# File lib/mail/part.rb, line 33
def bounced?
  !!(action =~ /failed/)
end
delivery_status_data() click to toggle source
# File lib/mail/part.rb, line 29
def delivery_status_data
  delivery_status_report_part? ? parse_delivery_status_report : {}
end
delivery_status_report_part?() click to toggle source
# File lib/mail/part.rb, line 25
def delivery_status_report_part?
  main_type =~ /message/ && sub_type =~ /delivery-status/
end
diagnostic_code() click to toggle source
# File lib/mail/part.rb, line 49
def diagnostic_code
  delivery_status_data['diagnostic-code'].value
end
error_status() click to toggle source
# File lib/mail/part.rb, line 45
def error_status
  delivery_status_data['status'].value
end
final_recipient() click to toggle source
# File lib/mail/part.rb, line 41
def final_recipient
  delivery_status_data['final-recipient'].value
end
has_content_id?() click to toggle source

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
remote_mta() click to toggle source
# File lib/mail/part.rb, line 53
def remote_mta
  delivery_status_data['remote-mta'].value
end
retryable?() click to toggle source
# File lib/mail/part.rb, line 57
def retryable?
  !(error_status =~ /^5/)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.