Skip to content

Commit

Permalink
Merge pull request #244 from sparc-request/ml-fix_email_feature_for_t…
Browse files Browse the repository at this point in the history
…ask_creation

ml-fix_email_feature_for_task_creation
  • Loading branch information
Stuart-Johnson committed Oct 3, 2017
2 parents e82fb85 + 46c59aa commit 8f2182f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/mailers/task_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class TaskMailer < ApplicationMailer
def task_confirmation(identity, task)
@identity = identity
@task = task
mail to: identity.email, subject: "(SPARCFulfillment) New Task Assigned"
env = ENV.fetch('ENVIRONMENT')
test_email = ENV.fetch('TESTING_EMAIL')
mail to: env == 'testing' ? test_email : identity.email, subject: "(SPARCFulfillment) New Task Assigned"
end
end
2 changes: 2 additions & 0 deletions dotenv.example
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ LDAP_AUTH_PASSWORD=
# add the following line if EPIC is turned off for your institution
USE_EPIC=false
USE_INDIRECT_COST=false
ENVIRONMENT=testing
TESTING_EMAIL=sparcrequest@gmail.com

0 comments on commit 8f2182f

Please sign in to comment.