class Mail::FromField

Public Instance Methods

encoded()
Also aliased as: encoded_without_jpmobile
encoded_with_jpmobile() click to toggle source
# File lib/jpmobile/mail.rb, line 515
def encoded_with_jpmobile
  if @mobile
    self.charset = @mobile.mail_charset

    _value = address_list.addresses.map {|_a|
      if Utilities.blank?(_a.display_name) || _a.display_name.ascii_only?
        _a.to_s
      else
        "#{@mobile.to_mail_subject(_a.display_name)} <#{_a.address}>"
      end
    }.join(', ')
    @address_list = AddressList.new(_value)
  end

  encoded_without_jpmobile
end
Also aliased as: encoded
encoded_without_jpmobile()
Alias for: encoded
initialize(value = nil, charset = 'utf-8')
Also aliased as: initialize_without_jpmobile
initialize_with_jpmobile(value = nil, charset = 'utf-8') click to toggle source
# File lib/jpmobile/mail.rb, line 498
def initialize_with_jpmobile(value = nil, charset = 'utf-8')
  @jpmobile_raw_text = value
  initialize_without_jpmobile(value, charset)
end
Also aliased as: initialize
initialize_without_jpmobile(value = nil, charset = 'utf-8')
Alias for: initialize
mobile=(m) click to toggle source
# File lib/jpmobile/mail.rb, line 506
def mobile=(m)
  @mobile = m
  if @mobile
    self.charset = @mobile.mail_charset
    self.value   = @jpmobile_raw_text
    self.parse
  end
end