Class: Venn::Services::Mandrill
- Inherits:
-
Object
- Object
- Venn::Services::Mandrill
- Defined in:
- lib/venn/services/mandrill.rb
Instance Method Summary collapse
-
#initialize(keys) ⇒ Mandrill
constructor
A new instance of Mandrill.
- #send(from, to, subject, message) ⇒ Object
Constructor Details
#initialize(keys) ⇒ Mandrill
Returns a new instance of Mandrill.
5 6 7 8 |
# File 'lib/venn/services/mandrill.rb', line 5 def initialize(keys) @name = 'mandrill' @client = ::Mandrill::API.new keys[:api_key] end |
Instance Method Details
#send(from, to, subject, message) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/venn/services/mandrill.rb', line 10 def send(from, to, subject, ) = { 'subject' => subject, 'to' => [{ 'email' => to}], 'from_email' => from, 'html' => } @client..send return @name end |