Skip to content

Commit

Permalink
Merge pull request #304 from lsst-epo/302-add-contact-form
Browse files Browse the repository at this point in the history
302 add contact form
  • Loading branch information
ericdrosas87 authored Oct 7, 2024
2 parents 77c4842 + 030acc8 commit f9d2479
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions api/config/contact-form.php
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;
}

Expand Down

0 comments on commit f9d2479

Please sign in to comment.