[英]sendgrid addon on heroku and devise
請幫忙! 我似乎無法使sendgrid插件正常工作,並且我已經做出了設計。 有沒有一種方法可以將設備用作電子郵件的發件人,如果可以,那么又如何呢? 或我在做什么錯:這是我重要的config / initializers / devise.rb代碼:
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,是否必須取消注釋?
在enviroment / production.rb中,我有:
config.action_mailer.default_url_options = { :host => 'myapp.herokuapp.com' }
您完成了基本的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
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.