Module: AmazonUrlGenerator

Defined in:
lib/amazon_url_generator.rb

Class Method Summary collapse

Class Method Details

.create_query(from, to, subject, body) ⇒ Object



2
3
4
# File 'lib/amazon_url_generator.rb', line 2

def self.create_query(from, to, subject, body)
  "/?Action=SendEmail&Source=#{URI.escape(from, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}&Destination.ToAddresses.member.1=#{URI.escape(to, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}&Message.Subject.Data=#{URI.escape(subject, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}&Message.Body.Html.Data=#{URI.escape(body, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}"
end