Skip to content

Instantly share code, notes, and snippets.

@mikeadeleke
Last active August 29, 2015 14:01
Show Gist options
  • Save mikeadeleke/87426050a6bc9f7602d0 to your computer and use it in GitHub Desktop.
Save mikeadeleke/87426050a6bc9f7602d0 to your computer and use it in GitHub Desktop.
Effed up Mailers
Error: https://www.dropbox.com/s/r3n2dfit5i3hg9e/Screenshot%202014-05-18%2019.47.07.png
production.rb
Domimvp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
config.eager_load = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_assets = false
config.assets.js_compressor = :uglifier
config.assets.compile = true
config.assets.digest = true
config.assets.version = '1.0'
config.log_level = :info
config.i18n.fallbacks = true
config.active_support.deprecation = :notify
config.log_formatter = ::Logger::Formatter.new
config.action_mailer.default_url_options = { :host => 'trydomi.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 = false
config.action_mailer.default :charset => "utf-8"
config.action_mailer.smtp_settings = {
:address => "smtp.mandrillapp.com",
:port => 465,
:user_name => ["madeleke13@gmail.com"],
:password => ["AHDSs0wI5CBJU0X0TMNgLA"]
}
config.force_ssl = true
end
development.rb
Domimvp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
# ActionMailer Config
config.action_mailer.delivery_method = :letter_opener
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"
end
environment.rb
# Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
Domimvp::Application.initialize!
Domimvp::Application.configure do
config.action_mailer.smtp_settings = {
:address => "smtp.mandrillapp.com",
:port => 465,
:enable_starttls_auto => true,
:user_name => ["madeleke13@gmail.com"],
:password => ["AHDSs0wI5CBJU0X0TMNgLA"],
:authentication => 'login'
}
end
config/initializers/mail.rb
ActionMailer::Base.smtp_settings = {
:port => '465',
:address => 'smtp.mandrillapp.com',
:user_name => ["madeleke13@gmail.com"],
:password => ["AHDSs0wI5CBJU0X0TMNgLA"],
:domain => 'heroku.com',
:authentication => "login"
}
ActionMailer::Base.delivery_method = :smtp
MandrillMailer.configure do |config|
config.api_key = ['wujwYuR4JB_JCH0DrqBZNw']
end
config/initializers/gibbon.rb
Gibbon::API.api_key = "dfb5c3dc15c8e6d03d72cf78c4cfda04-us7"
Gibbon::API.timeout = 15
Gibbon::API.throws_exceptions = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment