class method
self.parse
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
self.parse( str )
Parses an email from the supplied string and returns a TMail::Mail object.
Example:
require 'rubygems'; require 'tmail' email_string =<<HEREDOC To: mikel@lindsaar.net From: mikel@me.com Subject: This is a short Email Hello there Mikel! HEREDOC mail = TMail::Mail.parse(email_string) #=> #<TMail::Mail port=#<TMail::StringPort:id=0xa30ac0> bodyport=nil> mail.body #=> "Hello there Mikel!\n\n"
Parameters
-
strreq
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb, line 122
def parse( str )
new(StringPort.new(str))
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb line 122
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Mail