Mailer now working in production added scope for pending users
This commit is contained in:
parent
9260c3d2b7
commit
ea6909a6b0
1
Gemfile
1
Gemfile
|
@ -19,6 +19,7 @@ gem 'time_difference'
|
||||||
gem "acts_as_unvlogable"
|
gem "acts_as_unvlogable"
|
||||||
gem 'youtube_it'
|
gem 'youtube_it'
|
||||||
gem 'gotcha'
|
gem 'gotcha'
|
||||||
|
gem 'tlsmail'
|
||||||
|
|
||||||
# gem "memcached", "~> 1.4.3"
|
# gem "memcached", "~> 1.4.3"
|
||||||
# gem "memcache-client"
|
# gem "memcache-client"
|
||||||
|
|
|
@ -63,9 +63,8 @@ class User
|
||||||
:length => {:minimum => 3, :maximum => 50, :message => I18n.t("users.user_id_length") },
|
:length => {:minimum => 3, :maximum => 50, :message => I18n.t("users.user_id_length") },
|
||||||
:uniqueness => true
|
:uniqueness => true
|
||||||
|
|
||||||
def email_required?
|
scope :approval_pending, where(:approved => false)
|
||||||
false
|
|
||||||
end
|
|
||||||
# validates_uniqueness_of :email,:message=> I18n.t("devise.registrations.email_not_unique")
|
# validates_uniqueness_of :email,:message=> I18n.t("devise.registrations.email_not_unique")
|
||||||
|
|
||||||
# def new_attribute_values=(vars)
|
# def new_attribute_values=(vars)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
require 'tlsmail'
|
||||||
Orbit::Application.configure do
|
Orbit::Application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
# Settings specified here will take precednece over those in config/application.rb
|
||||||
|
|
||||||
# Code is not reloaded between requests
|
# Code is not reloaded between requests
|
||||||
config.cache_classes = false
|
config.cache_classes = false
|
||||||
|
@ -60,13 +61,15 @@ Orbit::Application.configure do
|
||||||
# Send deprecation notices to registered listeners
|
# Send deprecation notices to registered listeners
|
||||||
config.active_support.deprecation = :notify
|
config.active_support.deprecation = :notify
|
||||||
|
|
||||||
|
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)
|
||||||
config.action_mailer.delivery_method = :smtp
|
config.action_mailer.delivery_method = :smtp
|
||||||
|
config.action_mailer.perform_deliveries = true
|
||||||
|
config.action_mailer.raise_delivery_errors = false
|
||||||
config.action_mailer.smtp_settings = {
|
config.action_mailer.smtp_settings = {
|
||||||
:enable_starttls_auto => true,
|
:enable_starttls_auto => true,
|
||||||
:address => "http://smtp.gmail.com",
|
:address => "http://smtp.gmail.com",
|
||||||
:port => '587',
|
:port => '587',
|
||||||
:domain => "http://smtp.gmail.com",
|
:domain => "new.tp.rulingcom.com",
|
||||||
:authentication => "plain",
|
:authentication => "plain",
|
||||||
:user_name => "redmine@rulingcom.com",
|
:user_name => "redmine@rulingcom.com",
|
||||||
:password => "rulingredmine"
|
:password => "rulingredmine"
|
||||||
|
|
Loading…
Reference in New Issue