Class: Mail::ReturnPathField

Inherits:
CommonAddressField show all
Defined in:
lib/mail/fields/return_path_field.rb

Overview

4.4.3. REPLY-TO / RESENT-REPLY-TO

Note:  The "Return-Path" field is added by the mail  transport
       service,  at the time of final deliver.  It is intended
       to identify a path back to the orginator  of  the  mes-
       sage.   The  "Reply-To"  field  is added by the message
       originator and is intended to direct replies.

trace = [return]

1*received

return = “Return-Path:” path CRLF

path = ([CFWS] “<” ([CFWS] / addr-spec) “>” [CFWS]) /

obs-path

received = “Received:” name-val-list “;” date-time CRLF

name-val-list = [CFWS] [name-val-pair *(CFWS name-val-pair)]

name-val-pair = item-name CFWS item-value

item-name = ALPHA *([“-”] (ALPHA / DIGIT))

item-value = 1*angle-addr / addr-spec /

atom / domain / msg-id

Constant Summary collapse

NAME =

:nodoc:

'Return-Path'

Instance Attribute Summary

Attributes inherited from CommonField

#charset, #errors, #name, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CommonAddressField

#<<, #address, #addresses, #addrs, #decoded_group_addresses, #display_names, #each, #element, #encode_if_needed, #encoded_group_addresses, #formatted, #group_addresses, #group_names, #groups

Methods inherited from CommonField

#decoded, #element, #encoded, #parse, parse, #responsible_for?, #singular?, #to_s

Constructor Details

#initialize(value = nil, charset = nil) ⇒ ReturnPathField

Returns a new instance of ReturnPathField.



40
41
42
43
44
45
46
# File 'lib/mail/fields/return_path_field.rb', line 40

def initialize(value = nil, charset = nil)
  if value == '<>'
    super nil, charset
  else
    super
  end
end

Class Method Details

.singular?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/mail/fields/return_path_field.rb', line 36

def self.singular?
  true
end

Instance Method Details

#defaultObject



48
49
50
# File 'lib/mail/fields/return_path_field.rb', line 48

def default
  address
end