Skip to content

Commit

Permalink
Move headers next to where it is used
Browse files Browse the repository at this point in the history
  • Loading branch information
jrha committed Aug 15, 2019
1 parent e900362 commit 5411c47
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Gocdb_Services/NotificationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]";

$subject = sprintf(
'GocDB: A Role request from %1$s over %2$s requires your attention',
$requesting_user->getForename(),
Expand All @@ -173,6 +171,7 @@ private function send_email($role_requested, $requesting_user, $entity_name, $ap
));

$email = $approving_user->getEmail();
$headers = "From: [email protected]";

if (True) {
mail($email, $subject, $body, $headers);
Expand Down

0 comments on commit 5411c47

Please sign in to comment.