Class: Dyn::Messaging::SendMail

Inherits:
Object
  • Object
show all
Defined in:
lib/dyn/messaging/send_mail.rb

Instance Method Summary collapse

Constructor Details

#initialize(dyn) ⇒ SendMail

Returns a new instance of SendMail.



22
23
24
# File 'lib/dyn/messaging/send_mail.rb', line 22

def initialize(dyn)
  @dyn = dyn
end

Instance Method Details

#create(from, to, subject, bodytext, bodyhtml, cc, replyto, xheaders = {}) ⇒ Object

TODO: ??? test for valid X-header format??



28
29
30
31
# File 'lib/dyn/messaging/send_mail.rb', line 28

def create(from, to, subject, bodytext, bodyhtml, cc, replyto, xheaders={})
  @dyn.post("#{resource_path}", {from:from, to:to, subject:subject, bodytext:bodytext, bodyhtml:bodyhtml, cc:cc, replyto:replyto}.
    merge(xheaders))
end