diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-15 09:41:22 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-15 09:41:22 +0100 |
commit | cc8e32bde96955e62d73220240c57fafdd2cad1e (patch) | |
tree | ae54bc6508cf3d059ce73a6f62c27e040d718e9e | |
parent | 0ea97a53bd11a05f9a0b9bac12964e080b593ba0 (diff) |
Allow contact form recipient override.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Contact.pm | 4 | ||||
-rw-r--r-- | templates/web/fixmystreet.com/about/council.html | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm index c2cc54832..b98bdbcc7 100644 --- a/perllib/FixMyStreet/App/Controller/Contact.pm +++ b/perllib/FixMyStreet/App/Controller/Contact.pm @@ -236,6 +236,10 @@ sub send_email : Private { my $recipient = $c->cobrand->contact_email; my $recipient_name = $c->cobrand->contact_name(); + if (my $localpart = $c->get_param('recipient')) { + $recipient = join('@', $localpart, FixMyStreet->config('EMAIL_DOMAIN')); + } + $c->stash->{host} = $c->req->header('HOST'); $c->stash->{ip} = $c->req->address; $c->stash->{ip} .= diff --git a/templates/web/fixmystreet.com/about/council.html b/templates/web/fixmystreet.com/about/council.html index cd28a7269..651e4f57f 100644 --- a/templates/web/fixmystreet.com/about/council.html +++ b/templates/web/fixmystreet.com/about/council.html @@ -260,6 +260,7 @@ </div> <div class="form-group submit-group"> <input type="hidden" name="subject" value="Councils submission"> + <input type="hidden" name="recipient" value="enquiries"> <input type="hidden" name="dest" value="from_council"> <input type="submit" value="Send"> </div> |