1
我在使用cloud9开发应用程序时遇到问题。我使用mandrill来发送电子邮件,但它给我一个配置问题。这似乎是一个无效的关键错误,但在当地的发展也具有相同配置的工程...Mandrill无效密钥错误
有我的开发环境SMTP:
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']
}
感谢您的帮助。
如果您在CLOUD9打开控制台:'轨console'&进入'ENV [“mandrill_username”]'你收到正确的用户名后面? – Rob
@Rob是的,这是正确的。我使用figaro gem来获取环境变量。问题不是变数。 – cotorusso
这里可能还有其他事情发生,但'无效键'错误掩盖了潜在的问题。如果您添加config.action_mailer.raise_delivery_errors = true并重新启动您的应用程序并尝试再次发送,您应该能够看到幕后发生的情况以进一步排除故障。 – terrorbox