From 5411c473ee46910452d6d5e6c7805027b76da1e2 Mon Sep 17 00:00:00 2001 From: James Adams Date: Thu, 15 Aug 2019 11:31:06 +0100 Subject: [PATCH] Move headers next to where it is used --- lib/Gocdb_Services/NotificationService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Gocdb_Services/NotificationService.php b/lib/Gocdb_Services/NotificationService.php index ac5bebb9e..614781be9 100644 --- a/lib/Gocdb_Services/NotificationService.php +++ b/lib/Gocdb_Services/NotificationService.php @@ -147,8 +147,6 @@ private function mock_mail($to, $subject, $message, $additional_headers = "", $a private function send_email($role_requested, $requesting_user, $entity_name, $approving_user) { - $headers = "From: no-reply@goc.egi.eu"; - $subject = sprintf( 'GocDB: A Role request from %1$s over %2$s requires your attention', $requesting_user->getForename(), @@ -173,6 +171,7 @@ private function send_email($role_requested, $requesting_user, $entity_name, $ap )); $email = $approving_user->getEmail(); + $headers = "From: no-reply@goc.egi.eu"; if (True) { mail($email, $subject, $body, $headers);