From aa2b60563c590d2701e940025e43b64542cef94a Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 26 Feb 2015 19:22:39 +0100 Subject: Isolate webmaster, frontdesk and helpdesk. Use webmaster (not submitted email) as sender address. --- form.cgi | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'form.cgi') 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

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

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) { -- cgit v1.2.3