I am deploying a ruby app on AWS using sinatra. I want to use Mandrill to send emails.
I have created a file .ebextensions/app.config and the content is:
option_settings:
- option_name: MANDRILL_APIKEY
value: api_key_password
- option_name: MANDRILL_USERNAME
value: api_key_username
Is the structure correct in: .ebextensions/app.config
and is the file correct?
Either way it does not work and the error is "Wrong number of argumaents 0 (for 1..2)" so presumably nothing is being passed.
The email code snippet is:
require 'mandrill'
m = Mandrill::API.new
message = {
:subject=> "Hello from the Mandrill API",
:from_name=> "Cloudflow",
:text=>"Hi message, how are you?",
:to=>[
{
:email=> "user@gmail.com",
:name=> "User"
}
],
:html=>"<html><h1>Hi <strong>message</strong>, how are you?</h1></html>",
:from_email=>"notification@cloudflow.sh"
}
sending = m.messages.send message
puts sending
All help appreciated chaps, thank you.