diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-03-30 05:05:19 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-03-30 05:05:19 +0000 |
commit | 316906cbbb529839c2ffa3f37a010193f7722352 (patch) | |
tree | f25c83181472760bcd8c21981bc37eb6b9fa2cb0 /actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb | |
parent | f66bbf5ed0504a1514a16f0802e3455655b609b5 (diff) | |
download | rails-316906cbbb529839c2ffa3f37a010193f7722352.tar.gz rails-316906cbbb529839c2ffa3f37a010193f7722352.tar.bz2 rails-316906cbbb529839c2ffa3f37a010193f7722352.zip |
Merge in latest tmail trunk r241
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9144 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb b/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb index 991c1b829e..206653bd5d 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail-1.2.2/tmail/interface.rb @@ -966,31 +966,33 @@ module TMail end end - # Destructively convert the Mail object's body into a Base64 encoded email + # Convert the Mail object's body into a Base64 encoded email # returning the modified Mail object def base64_encode! store 'Content-Transfer-Encoding', 'Base64' - self.body = Base64.folding_encode(self.body) + self.body = base64_encode end - # ==Depreciation warning - # base64_encode will return the body encoded, not modify the message body in - # future versions of TMail - alias :base64_encode :base64_encode! + # Return the result of encoding the TMail::Mail object body + # without altering the current body + def base64_encode + Base64.folding_encode(self.body) + end - # Destructively convert the Mail object's body into a Base64 decoded email + # Convert the Mail object's body into a Base64 decoded email # returning the modified Mail object def base64_decode! if /base64/i === self.transfer_encoding('') store 'Content-Transfer-Encoding', '8bit' - self.body = Base64.decode(self.body, @config.strict_base64decode?) + self.body = base64_decode end end - # ==Depreciation warning - # base64_decode will return the body decoded, not modify the message body in - # future versions of TMail - alias :base64_decode :base64_decode! + # Returns the result of decoding the TMail::Mail object body + # without altering the current body + def base64_decode + Base64.decode(self.body, @config.strict_base64decode?) + end # Returns an array of each destination in the email message including to: cc: or bcc: # |