Permalink
Browse files

Switched to SMTP for email.

  • Loading branch information...
1 parent ab55e53 commit 1e95bfa0c191839eed117df720469f39f3f84335 @benubois benubois committed Apr 11, 2014
Showing with 17 additions and 13 deletions.
  1. +0 −1 Gemfile
  2. +0 −7 Gemfile.lock
  3. +5 −3 README.md
  4. +2 −0 app/mailers/user_mailer.rb
  5. +10 −2 config/application.rb
View
@@ -33,7 +33,6 @@ gem 'rubyzip', '= 1.1.0'
gem 'activerecord-import', '>= 0.4.1'
gem 'redis', '>= 3.0.5'
gem 'jquery-rails'
-gem 'postmark-rails'
gem 'dalli'
gem 'will_paginate'
gem 'sanitize'
View
@@ -209,12 +209,6 @@ GEM
mini_portile (~> 0.5.0)
pg (0.17.1)
polyglot (0.3.4)
- postmark (1.1.0)
- json
- rake
- postmark-rails (0.6.0)
- actionmailer (>= 3.0.0)
- postmark (~> 1.1.0)
quiet_assets (1.0.2)
railties (>= 3.1, < 5.0)
rack (1.5.2)
@@ -355,7 +349,6 @@ DEPENDENCIES
longurl
opml_saw!
pg
- postmark-rails
quiet_assets
rails (~> 4.0.0)
readability_parser
View
@@ -44,7 +44,7 @@ Feedbin uses environment variables for configuration. Feedbin will run without a
| CAMO_HOST | CDN to point to the camo host |
| CAMO_KEY | Used to rewrite assets to use https - https://github.com/atmos/camo |
| DATABASE_URL | Database connection string - postgres://USER:PASS@IP:PORT/DATABASE |
-| DEFAULT_URL_OPTIONS_HOST | Mailer host - feedbin.com |
+| DEFAULT_URL_OPTIONS_HOST | Mailer host - feedbin.com |
| ELASTICSEARCH_URL | search endpoint - http://localhost:9200 |
| FEEDBIN_HOMEPAGE_REPO | Git URL to a Rails engine that provides a custom homepage |
| FROM_ADDRESS | Used as a reply-to email address |
@@ -55,14 +55,16 @@ Feedbin uses environment variables for configuration. Feedbin will run without a
| LIBRATO_USER | Used for reporting stats - http://metrics.librato.com |
| MEMCACHED_HOSTS | Comma separated memcached hosts/ports - 192.168.1.2:11121 |
| POSTGRES_USERNAME | Used for connecting to database |
-| POSTMARK_API_KEY | Used for sending email - http://postmarkapp.com |
-| PUSH_URL | URL for the Feedbin instance - https://feedbin.com |
+| PUSH_URL | URL for the Feedbin instance - https://feedbin.com |
| RACK_ENV | Environment - production |
| RAILS_ENV | Environment - production |
| READABILITY_API_TOKEN | Used for Readability - http://www.readability.com |
| REDIS_URL | redis connection string - redis://redis:PASSWORD@192.168.1.3:6379 |
| SECRET_KEY_BASE | Encryptions key for Rails - run `rake secret` |
| SIDEKIQ_PASSWORD | Sidekiq Basic Auth Password |
+| SMTP_ADDRESS | SMTP Host |
+| SMTP_USERNAME | SMTP Username |
+| SMTP_PASSWORD | SMTP Password |
| STRIPE_API_KEY | Used for communicating with stripe - https://stripe.com |
| STRIPE_PUBLIC_KEY | Used for communicating with stripe - https://stripe.com |
@@ -1,5 +1,7 @@
class UserMailer < ActionMailer::Base
+ default from: ENV['FROM_ADDRESS']
+
def payment_receipt(billing_event)
@billing_event = BillingEvent.find(billing_event)
@user = @billing_event.billable
View
@@ -24,8 +24,16 @@ class Application < Rails::Application
config.assets.initialize_on_precompile = true
config.serve_static_assets = true
- config.action_mailer.delivery_method = :postmark
- config.action_mailer.postmark_settings = { api_key: ENV['POSTMARK_API_KEY'] }
+ config.action_mailer.delivery_method = :smtp
+ config.action_mailer.smtp_settings = {
+ address: ENV['SMTP_ADDRESS'],
+ port: 587,
+ enable_starttls_auto: true,
+ authentication: 'login',
+ user_name: ENV['SMTP_USERNAME'],
+ password: ENV['SMTP_PASSWORD'],
+ domain: ENV['DEFAULT_URL_OPTIONS_HOST']
+ }
config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td', 'th', 'thead', 'tbody'

0 comments on commit 1e95bfa

Please sign in to comment.