2010-05-06 5 views
2

Я на рельсах 2.3.5 и у вас установлен последний Ruby, и мое приложение работает хорошо, за исключением сообщений GMail.Rails отправить почту с GMail

Я пытаюсь настроить мое почтовое соединение gmail, которое работало ранее, но теперь не хочет знать.

Это мой код:

# Be sure to restart your server when you modify this file 

# Uncomment below to force Rails into production mode when 
# you don't control web/app server and can't set it the proper way 
# ENV['RAILS_ENV'] ||= 'production' 

# Specifies gem version of Rails to use when vendor/rails is not present 
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION 

# Bootstrap the Rails environment, frameworks, and default configuration 
require File.join(File.dirname(__FILE__), 'boot') 


Rails::Initializer.run do |config| 
    # Gems 
    config.gem "capistrano-ext", :lib => "capistrano" 
    config.gem "configatron" 

    # Make Time.zone default to the specified zone, and make Active Record store time values 
    # in the database in UTC, and return them converted to the specified local zone. 
    config.time_zone = "London" 

    # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths. 
    # All files from config/locales/*.rb,yml are added automatically. 
    # config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')] 
    #config.i18n.default_locale = :de 

    # Your secret key for verifying cookie session data integrity. 
    # If you change this key, all old sessions will become invalid! 
    # Make sure the secret is at least 30 characters and all random, 
    # no regular words or you'll be exposed to dictionary attacks. 
    config.action_controller.session = { 
    :session_key => '_base_session', 
    :secret  => '7389ea9180b15f1495a5e73a69a893311f859ccff1ffd0fa2d7ea25fdf1fa324f280e6ba06e3e5ba612e71298d8fbe7f15fd7da2929c45a9c87fe226d2f77347' 
    } 

    config.active_record.observers = :user_observer 

end 

ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(:default => '%d/%m/%Y') 
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(:default => '%d/%m/%Y') 

require "will_paginate" 

ActionMailer::Base.delivery_method = :smtp 
ActionMailer::Base.smtp_settings = { 
    :enable_starttls_auto => true, 
    :address => "smtp.gmail.com", 
    :port => 587, 
    :domain => "XXXXXXXX.XXX", 
    :authentication => :plain, 
    :user_name => "XXXXXXXXXX.XXXXXXXXXX.XXX", 
    :password => "XXXXX" 
} 

Но выше всего приводит к ошибке SMTP AUTH в журнале производства.

Я читал разнообразные сообщения об этом, не работающие в Rails 2.2.2, но ничего для 2.3.5, у кого не было никаких идей?

Спасибо,

Дэнни

ответ

Смежные вопросы