From 8a47ad96de997bd6a9e7313b255a53205d96d1d0 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sun, 11 Feb 2018 01:18:43 +0100 Subject: [PATCH] Fix sendmail bounce --- www/paamelding/index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/paamelding/index.php b/www/paamelding/index.php index 86fb2db..9b023be 100644 --- a/www/paamelding/index.php +++ b/www/paamelding/index.php @@ -30,8 +30,9 @@ if (isset($_GET['code'])) { if (isset($_SESSION['userdata'])) { // if logged in with feide $mailHeaders = "MIME-Version: 1.0" . "\r\n"; $mailHeaders .= "Content-type:text/html;charset=UTF-8" . "\r\n"; - $mailHeaders .= 'From: ' . "\r\n"; + $mailHeaders .= 'From: ' . "\r\n"; $mailHeaders .= 'Cc: <' . htmlspecialchars($_SESSION['userdata']['user']['email']) .'>' . "\r\n"; + $mailParams = "-fspikkjeposche@pvv.ntnu.no"; $mailTo = "nybruker@pvv.ntnu.no"; $mailSubject = "Nytt medlem for PVV"; $mailBody @@ -41,7 +42,7 @@ if (isset($_SESSION['userdata'])) { // if logged in with feide . "Epost: " . htmlspecialchars($_SESSION['userdata']['user']['email']) . "\n" . "Jeg skal betale medlemsavgiften, og kommer innom PVVs lokaler for å aktivere kontoen min"; if (isset($_GET['send_mail'])) { // if logged in with feide - mail($mailTo, $mailSubject, $mailBody, $mailHeaders); + mail($mailTo, $mailSubject, $mailBody, $mailHeaders, $mailParams); } }