Class URI::MailTo
In: lib/uri/mailto.rb
Parent: Generic

RFC2368, The mailto URL scheme

Methods

build   headers=   new   set_headers   set_to   to=   to_mailtext   to_rfc822text   to_s  

Included Modules

REGEXP

Constants

DEFAULT_PORT = nil
COMPONENT = [ :scheme, :to, :headers ].freeze

Attributes

headers  [R] 
to  [R] 

Public Class methods

Description

Creates a new URI::MailTo object from components of URI::MailTo with check. It is to and headers. It provided by an Array of a Hash. You can provide headers as String like "subject=subscribe&cc=addr" or Array like [["subject", "subscribe"], ["cc", "addr"]]

Description

Creates a new URI::MailTo object from ``generic’’ components with no check. Because, this method is usually called from URI::parse and the method checks validity of each components.

Public Instance methods

Usage

  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"
to_rfc822text()

Alias for to_mailtext

Protected Instance methods

To view or add comments on this documentation, please go to the API wiki.

[Validate]