Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

switch delivery_method by environment

non-production environment is not required to send mail.
  • Loading branch information...
commit de878818d762bddf3392aa75af5134b1421548d9 1 parent 45fe468
Takeshi Yabe tyabe authored

Showing 1 changed file with 11 additions and 7 deletions. Show diff stats Hide diff stats

  1. +11 7 config/apps.rb
18 config/apps.rb
... ... @@ -1,13 +1,17 @@
1 1 Padrino.configure_apps do
2 2 set :sessions, true
3 3 set :session_secret, '339ed174e13302a1c6f090df5ebf2b6df9d8e153f21df757229e0629aa143321'
4   - set :delivery_method, :smtp => {
5   - :address => 'smtp.lipsiasoft.com',
6   - :port => '25',
7   - :user_name => 'mailer@lipsiasoft.com',
8   - :password => 'mailer!',
9   - :authentication => :login # :plain, :login, :cram_md5, no auth by default
10   - }
  4 + if production?
  5 + set :delivery_method, :smtp => {
  6 + :address => 'smtp.lipsiasoft.com',
  7 + :port => '25',
  8 + :user_name => 'mailer@lipsiasoft.com',
  9 + :password => 'mailer!',
  10 + :authentication => :login # :plain, :login, :cram_md5, no auth by default
  11 + }
  12 + else
  13 + set :delivery_method, :test
  14 + end
11 15 end
12 16
13 17 # Mounts the core application for this project

0 comments on commit de87881

Please sign in to comment.
Something went wrong with that request. Please try again.