Skip to content

Commit

Permalink
Moved mail config to settings variables, added gems for other providers
Browse files Browse the repository at this point in the history
  • Loading branch information
scott committed Jan 16, 2016
1 parent d164ff0 commit 6adb64f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 61 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ gem 'mail_extract'
gem 'griddler'
gem 'griddler-mandrill'
gem 'griddler-sendgrid'
gem 'griddler-mailgun'
gem 'griddler-postmark'
gem 'griddler-cloudmailin'

gem 'rails-timeago'

Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,14 @@ GEM
griddler (1.1.0)
htmlentities
rails (>= 3.2.0)
griddler-cloudmailin (0.0.1)
griddler
griddler-mailgun (1.0.2)
griddler
griddler-mandrill (1.0.2)
griddler
griddler-postmark (1.0.0)
griddler
griddler-sendgrid (0.0.1)
griddler
hashie (3.4.1)
Expand Down Expand Up @@ -360,7 +366,10 @@ DEPENDENCIES
globalize-versioning (~> 0.1.0)
gravtastic
griddler
griddler-cloudmailin
griddler-mailgun
griddler-mandrill
griddler-postmark
griddler-sendgrid
http_accept_language
i18n-country-translations
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/griddler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
config.processor_class = EmailProcessor # CommentViaEmail
config.processor_method = :process # :create_comment (A method on CommentViaEmail)
config.reply_delimiter = '--- Make sure your reply appears above this line ---'
config.email_service = :sendgrid # :sendgrid :cloudmailin, :postmark, :mandrill, :mailgun
config.email_service = Settings.mail_service # :sendgrid :cloudmailin, :postmark, :mandrill, :mailgun
end
12 changes: 6 additions & 6 deletions config/initializers/mail.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ActionMailer::Base.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => 587,
:user_name => Settings.mail_username,
:password => Settings.mail_api_key,
:domain => 'heroku.com'
}
:address => Settings.mail_smtp,
:port => Settings.mail_port,
:user_name => Settings.smtp_mail_username,
:password => Settings.smtp_mail_password,
:domain => Settings.mail_domain
}
48 changes: 0 additions & 48 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,52 +83,4 @@
# Mount attachinary
mount Attachinary::Engine => "/attachinary"

# Example of regular route:
# get 'products/:id' => 'catalog#view'

# Example of named route that can be invoked with purchase_url(id: product.id)
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase

# Example resource route (maps HTTP verbs to controller actions automatically):
# resources :products

# Example resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end

# Example resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end

# Example resource route with more complex sub-resources:
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', on: :collection
# end
# end

# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable

# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
end
18 changes: 12 additions & 6 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@ site_url: http://support.yourdomain.com # This is the URL of your support site
site_name: Helpy Support # This is the name of your support site
site_tagline: Support and Helpdesk Software # This is the tagline of your support site
product_name: # This is the product name your are supporting
support_phone: # This is support number to be displayed

# Mandrill Account
mandrill_username: #Enter your Madrill username
mandrill_api_key: #Enter your Madrill API Key
support_phone: # This is support number to be displayed

# Analytics and Tracking
google_analytics_id: #Enter your analytics ID
send_usage_data: true

#Mail specific settings:
admin_email: [email protected]
from_email: [email protected]
from_email: [email protected] # This is the email that will be used for email replies (reply to)
send_email: true #send email or not

mail_service: :mandrill # :sendgrid :cloudmailin, :postmark, :mandrill, :mailgun
smtp_mail_username: # Enter your SMTP email username
smtp_mail_password: # Enter your SMTP email password
mail_smtp: 'smtp.mandrillapp.com' #Enter the server address for your SMTP server
mail_port: 587 #Enter the port of your SMTP server
mail_domain: #Enter your the heroku.com if you are on heroku, otherwise enter your domain

0 comments on commit 6adb64f

Please sign in to comment.