2015-04-03 33 views
-1

我的應用程序用於在創建帳戶登錄時發送電子郵件確認。但我用rake數據庫重置我的數據庫:重置,現在當我創建一個新的帳戶,我從來沒有收到和電子郵件確認。所以我不能登錄到我的應用程序。我的網絡應用程序不會發送確認電子郵件

這裏是我的github https://github.com/goldmullet/bloccit

+0

PS。我正在使用Sendgrid作爲我的電子郵件客戶端 – goldmullet 2015-04-03 05:55:56

回答

0

你可以在/config/production.rb添加以下代碼行通過SMTP發送:

config.action_mailer.delivery_method = :smtp 
    config.action_mailer.perform_deliveries = true 
    config.action_mailer.raise_delivery_errors = false 
    config.action_mailer.default :charset => "utf-8" 

    config.action_mailer.smtp_settings = { 
     address: "smtp.sendgrid.net", 
     port: 587, 
     authentication: "plain", 
     enable_starttls_auto: true, 
     user_name: ENV['SENDGRID_USERNAME'], 
     password: ENV['SENDGRID_PASSWORD'] 
    } 
相關問題