2013-10-19 3 views
1

도와주세요! 나는 sendgrid addon을 작동시키는 것처럼 보이지 않는다. 그리고 나는 고안한다. 전자 메일을 보내는 사람으로 장치를 사용하는 방법이 있습니까? 그렇다면 어떻게해야합니까? 아니면 내가 뭘 잘못 :heroku에서 sendgrid addon을 다운로드하고

Devise.setup do |config| 
    # ==> Mailer Configuration 

    #config.mailer_sender = "myapp.herokuapp.com" 

    # Configure the class responsible to send e-mails. 
    #config.mailer = "Devise::Mailer" 

나는 내가 sendgrid을 사용하려면이 주석을 제거해야합니까 : 여기 내 중요한 설정/초기화/devise.rb 코드? 환경에서

/production.rb 내가 가진 :

config.action_mailer.default_url_options = { :host => 'myapp.herokuapp.com' } 
+0

저도 같은 문제가 발생했습니다. – groodt

답변

2

당신은 기본 Sendgrid 구성을 완료 했습니까?

https://devcenter.heroku.com/articles/sendgrid

ActionMailer::Base.smtp_settings = { 
    :address  => 'smtp.sendgrid.net', 
    :port   => '587', 
    :authentication => :plain, 
    :user_name  => ENV['SENDGRID_USERNAME'], 
    :password  => ENV['SENDGRID_PASSWORD'], 
    :domain   => 'heroku.com', 
    :enable_starttls_auto => true 
}