Skip to content
instance method

URI::MailTo#to_rfc822text

() -> ::String
to_rfc822text

Alias of #to_mailtext

Returns the RFC822 e-mail text equivalent of the URL, as a String.

Example:

Example
require 'uri'

uri = URI.parse("mailto:[email protected]?Subject=subscribe&cc=myaddr")
uri.to_mailtext
# => "To: [email protected]\nSubject: subscribe\nCc: myaddr\n\n\n"
See also #to_mailtext #to_s #to= also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0