login/mailpass: names in address headers, site sender
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 10 Feb 2019 07:19:07 +0000 (08:19 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sun, 10 Feb 2019 08:22:03 +0000 (09:22 +0100)
login/mailpass.inc.php

index 6138ceb2fd0d0c934ab8aac7fffddd6f15d20695..1be0d68e14c3c4c5e9e4bb4532570fdd84f3da8e 100644 (file)
@@ -31,8 +31,10 @@ function mailtoken($email)
        $mailbody = str_replace(array_keys($rep), array_values($rep), $mailbody);
        if (!$mailbody) throw new Exception('empty mail body');
        $mailsub = "Wachtwoord-reset voor $sitename";
+       $mailhead = "From: $sitename <info@$sitename>";
+       $rcpt = "$found <$email>";
 
-       return mail($email, $mailsub, $mailbody);
+       return mail($rcpt, $mailsub, $mailbody, $mailhead);
        return TRUE;
 }