Skip to content

Commit

Permalink
Fixed production actionmailer settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Mills committed Dec 4, 2009
1 parent c51a717 commit cb67126
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions REVISION
@@ -0,0 +1 @@
c51a71785496d3503bfad37d898b11e13c790574
6 changes: 6 additions & 0 deletions app/controllers/application_controller.rb
Expand Up @@ -12,6 +12,12 @@ class ApplicationController < ActionController::Base

helper_method :current_user

before_filter :mailer_set_url_options

def mailer_set_url_options
ActionMailer::Base.default_url_options[:host] = request.host_with_port
end

def require_user
if ! current_user
flash[:notice] = "Please login"
Expand Down
2 changes: 1 addition & 1 deletion app/models/notifier.rb
@@ -1,5 +1,5 @@
class Notifier < ActionMailer::Base
default_url_options[:host] = "referencebin.com"
#default_url_options[:host] = "referencebin.com"

def verification_instructions(user)
subject "prb - Email Verification"
Expand Down
12 changes: 11 additions & 1 deletion config/environments/production.rb
Expand Up @@ -24,5 +24,15 @@
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false

ActionMailer::Base.delivery_method = :sendmail
#ActionMailer::Base.sendmail_settings = {
# :location => '/usr/sbin/sendmail',
# :arguments => '-i -t'
#}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.default_charset = "iso-8859-1"


# Enable threaded mode
# config.threadsafe!
# config.threadsafe!
1 change: 1 addition & 0 deletions db/sphinx
1 change: 1 addition & 0 deletions log
1 change: 1 addition & 0 deletions public/system
1 change: 1 addition & 0 deletions tmp/pids

0 comments on commit cb67126

Please sign in to comment.