summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2015-02-26 19:22:39 +0100
committerJonas Smedegaard <dr@jones.dk>2015-02-26 19:22:39 +0100
commitaa2b60563c590d2701e940025e43b64542cef94a (patch)
treef9f2a57d9331c6c400b9e6c42622c702befb8b28
parentdae5d5e8613f3511934ca5c9e32b831497259bd3 (diff)
Isolate webmaster, frontdesk and helpdesk. Use webmaster (not submitted email) as sender address.
-rwxr-xr-xform.cgi20
1 files changed, 9 insertions, 11 deletions
diff --git a/form.cgi b/form.cgi
index 257efdc..005fd5e 100755
--- a/form.cgi
+++ b/form.cgi
@@ -9,6 +9,11 @@ my $webroot = 'http://bynu.biks.dk/feedback/';
my $req_path = $build_path . '/html/feedback/index.html';
my $ack_path = $build_path . '/html/feedback/tak/index.html';
+my $webmaster = 'info@byvandring.nu';
+#my $frontdesk = 'info@byvandring.nu';
+my $frontdesk = 'siri@jones.dk';
+my $helpdesk = 'siri@jones.dk';
+
# Set this to 1 for a separate confirmation page
my ($confirm) = 1;
@@ -54,33 +59,26 @@ $form->field(
);
my ($form_required_text) = $form->{opt}{messages}{form_required_text};
-my ($mail_from) = $form->field('email') || undef;
+my ($mail_from) = $webmaster;
my ($mail_to, $mail_subject);
if ($form->submitted) {
$infostring = "Tak for din feedback!";
if ($form->validate) {
-# $mail_to = 'info@byvandring.nu';
- $mail_to = 'siri@jones.dk';
+ $mail_to = $frontdesk;
$mail_subject = 'Feedback til Byvandring.nu';
} else {
-# $mail_to = 'siri@jones.dk, info@byvandring.nu';
- $mail_to = 'siri@jones.dk';
+ $mail_to = "$frontdesk, $helpdesk";
$mail_subject = 'FEJL ved feedback til Byvandring.nu';
$infostring .= "\n<P>OBS! Der var fejl i et eller flere af felterne. Informationerne er sendt uanset, men det anbefales at gå tilbage, checke at alle felter er udfyldt korrekt, og derefter sende igen.";
$confirm = 0;
};
-# if ($form->field('email')) {
-# $infostring .= "\n<P>Der er sendt en kopi af tilmeldingen til " . $form->field('email') . ".";
-# $mail_to .= ', ' . $form->field('email');
-# }
# Abuse subject to add additional headers
# $mail_subject .= "\n" . 'Content-Type: text/plain; charset="ISO-8859-1";';
# $mail_subject .= "\n" . 'Content-Transfer-Encoding: 8bit';
$form->mailresults(
- to => "$mail_to",
+ to => $mail_to,
from => $mail_from,
-# subject => "$mail_subject: " . $form->field('brugergruppe_navn'),
subject => "$mail_subject",
);
if ($confirm) {