Search code examples
ruby-on-railsrubycloud9-idemandrill

Mandrill invalid key error


I have a problem with an app developing on cloud9. I'm using mandrill to send email but it gives me a problem with configuration. It seems to be an invalid key error but in local development it works with the same configuration...

There are my smtp in development environment:

config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { host: config.app_domain }
config.action_mailer.smtp_settings = {
    address: 'smtp.mandrillapp.com', 
    port: '587',
    enable_starttls_auto: true,
    user_name: ENV['mandrill_username'],
    password:  ENV['mandrill_password'],
    authentication: :plain,
    domain:    ENV['mandrill_domain']
}

Thanks for help.


Solution

  • Since Cloud9 workspaces are hosted on GCE servers, there are restrictions in place for sending email from a GCE instance. The following article explains the restrictions:

    https://cloud.google.com/compute/docs/tutorials/sending-mail/