2016-11-15 122 views
0

我加sendgrid我在Heroku上的应用程序作为我的电子邮件发件人,但每次用户尝试注册,与文本“www.mydomain.com" is currently unable to handle this request"。Heroku的日志不显示任何错误发生错误。这是我的production.rbSendgrid不发送电子邮件

config.action_mailer.smtp_settings = { 
    :address  => "smtp.sendgrid.net", 
    :port   => "587", 
    :authentication => :plain, 
    :user_name  => "<%= ENV['SENDGRID_USERNAME'] %>", 
    :password  => "<%= ENV['SENDGRID_PASSWORD'] %>", 
    :domain   => "mydomain.com", 
    :enable_starttls_auto => true 
} 
+0

你在电子邮件中发送图片或文本严格? – bkunzi01

+0

严格的文字,这是一个确认电子邮件与设计@ bkunzi – chrisgeeq

+0

也许这是一个问题与设计的秘密密钥需要设置为生产,但我不能肯定地说。 – bkunzi01

回答

1

我终于得到了答案,我不得不改变设置初始化/设计从

config. mailer_sender = mail 

config. mailer_sender = [email protected] 
0

添加smtp_settings哈希之外你贴下面的一切:

config.action_mailer.default_url_options = { host: 'http://somedomain.com' } 

此外,请确保您添加的环境变量您的用户名和密码的Heroku

012!
+0

所有工作正常,我只是不知道发生在sendgrid上的错误,因为,heroku日志显示没有任何错误。 – chrisgeeq

相关问题