确认邮件不会进入设计验证

时间:2012-07-30 08:33:31

标签: ruby-on-rails devise mongoid

我正在使用rails 3.2.5并设计身份验证 ..我改变了 配置/环境/ development.rb

# ActionMailer Config
  config.action_mailer.default_url_options = { :host => 'localhost:3000' }
  config.action_mailer.delivery_method = :smtp
  # change to true to allow email to be sent during development
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.default :charset => "utf-8"

  config.action_mailer.smtp_settings = {
    address: "smtp.gmail.com",
    port: 587,
    domain: "gmail.com",
    user_name: "regmiprem101@gmail.com",
    password: "*******",
    authentication: login,
    enable_starttls_auto: true
  }

我更改了config / environments / production.rb

config.action_mailer.default_url_options = { :host => 'gmail.com' }
  # ActionMailer Config
  # Setup for production - deliveries, no errors raised
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.default :charset => "utf-8"

  config.action_mailer.smtp_settings = {
    address: "smtp.gmail.com",
    port: 587,
    domain: "gmail.com",
    authentication: login,
    enable_starttls_auto: true,
    user_name: ENV["regmiprem101@gmail.com"],
    password: ENV["*******"]
  }

我改变了cinfig / initializers / devise.rb

  config.mailer_sender = "regmiprem101@gmail.com"
       config.mailer = "Devise::Mailer"

但它不起作用。我是否必须在配置中更改其他内容?

0 个答案:

没有答案