试图为RoR4.2应用程序开发环境设置Mailgun,但仍然出现上述错误。正如我从这answer理解配置开发文件有问题。在Devise :: RegistrationsController中使用Cloud9 IDE和Mailgun获取此错误Net :: SMTPSyntaxError#create
这是我的配置/环境/ development.rb:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
host = 'my_app.c9.io'
config.action_mailer.default_url_options = { host: host }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.mailgun.org',
port: '2525',
domain: ENV["MAILGUN_DOMAIN"],
user_name: ENV["MAILGUN_USERNAME"],
password: ENV["MAILGUN_PASSWORD"],
authentication: :plain,
enable_starttls_auto: true,
}
如建议在控制台here我还检查了环境变量,它们的设置是否正确。我建议使用端口2525 here和here。任何想法可能是错误的?
我试过每一个,但不幸的是他们都没有工作。我终于找到了临时解决方案,贴在上面。 – bosp