Class: PostageAppMailer

Inherits:
MetaMailer show all
Defined in:
lib/postageappm.rb

Instance Method Summary collapse

Methods inherited from MetaMailer

#send_secure

Instance Method Details

#send(from, to, subject, html, text) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/postageappm.rb', line 9

def send(from, to, subject, html, text)
  request = PostageApp::Request.new(:send_message, {
    'headers' => {
      'from' => from,
      'subject' => subject,
    }, 
    'recipients' => to,
    'content' => {
      'text/plain'  => text
    }
  })
  response = request.send
  response.ok?
end