instance method
with_multipart_encoding
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18 PrivateAvailable in: v2.2.3 v2.3.18
Signature
with_multipart_encoding( strategy )
No documentation comment.
Parameters
-
strategyreq
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb, line 190
def with_multipart_encoding( strategy )
if parts().empty? # DO NOT USE @parts
yield
else
bound = ::TMail.new_boundary
if @header.key? 'content-type'
@header['content-type'].params['boundary'] = bound
else
store 'Content-Type', %<multipart/mixed; boundary="#{bound}">
end
yield
parts().each do |tm|
strategy.puts
strategy.puts '--' + bound
tm.accept strategy
end
strategy.puts
strategy.puts '--' + bound + '--'
strategy.write epilogue()
end
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb line 190
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Mail