-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed hardcoded emails to env vars for contact f
Changed hardcoded emails to env vars for contact form
- Loading branch information
1 parent
a7f7564
commit 78d5d9d
Showing
1 changed file
with
6 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
<?php | ||
|
||
use Craft; | ||
use craft\helpers\App; | ||
|
||
$request = Craft::$app->request; | ||
|
||
// 'toEmail' => '[email protected]', // override this one with env vars | ||
|
||
if (!$request->getIsConsoleRequest()) { | ||
$topic = $request->getBodyParam("topic"); | ||
$to_list = null; | ||
|
||
if($topic != null) { | ||
switch($topic) { | ||
case "website_feedback": | ||
$to_list = "[email protected],[email protected]"; | ||
$to_list = App::env('CONTACT_FORM_TO_ADDRESSES_FOR_FEEDBACK'); | ||
break; | ||
case "general": | ||
$to_list = "[email protected],[email protected]"; | ||
$to_list = App::env('CONTACT_FORM_TO_ADDRESSES_FOR_GENERAL'); | ||
break; | ||
case "education": | ||
$to_list = "[email protected],[email protected]"; | ||
$to_list = App::env('CONTACT_FORM_TO_ADDRESSES_FOR_EDUCATION'); | ||
break; | ||
case "media": | ||
$to_list = "[email protected],[email protected]"; | ||
$to_list = App::env('CONTACT_FORM_TO_ADDRESSES_FOR_MEDIA'); | ||
break; | ||
case "site_visit": | ||
$to_list = "[email protected]"; | ||
$to_list = App::env('CONTACT_FORM_TO_ADDRESSES_FOR_VISITS'); | ||
break; | ||
default: | ||
$to_list = "[email protected]"; | ||
break; | ||
} | ||
|
||
|