Module RMail::Utils
In: lib/rmail/utils.rb

The RMail::Utils module is a collection of random utility methods that are useful for dealing with email.

Methods

Public Class methods

Decode the given string as if it were a chunk of base64 data

[Source]

# File lib/rmail/utils.rb, line 47
      def base64_decode(str)
        str.unpack("m*").first
      end

Decode the given string as if it were a chunk of quoted printable data

[Source]

# File lib/rmail/utils.rb, line 53
      def quoted_printable_decode(str)
        str.unpack("M*").first
      end

Return the given string unquoted if it is quoted.

[Source]

# File lib/rmail/utils.rb, line 38
      def unquote(str)
        if str =~ /\s*"(.*?([^\\]|\\\\))"/m
          $1.gsub(/\\(.)/, '\1')
        else
          str
        end
      end

[Validate]