Class TMail::Attachment
In: lib/tmail/quoting.rb
lib/tmail/attachments.rb
Parent: Object

Methods

Included Modules

TextUtils

Attributes

content_type  [RW] 
original_filename  [RW] 

Public Instance methods

Only unquote if quoted

[Source]

# File lib/tmail/quoting.rb, line 68
    def original_filename(to_charset = 'utf-8')
      if quoted?(quoted_filename)
        Unquoter.unquote_and_convert_to(quoted_filename, to_charset).chomp
      else
        quoted_filename
      end
    end

[Source]

# File lib/tmail/quoting.rb, line 63
    def quoted?(string)
      !!((string =~ /.+'\w\w'.+/) || (string =~ /=\?.+\?.\?.+\?=/))
    end
quoted_filename(to_charset = 'utf-8')

Alias for original_filename

[Validate]