# HG changeset patch # User Dirk Olmes # Date 1662440651 -7200 # Node ID cf31bf5fce72657cd55e9f9b2f4bcc33fcf4acfe # Parent bb513b8b0caf727efafb9043d59d95fad58c1e64 Author of the blog post as mail header for efficient spam filtering diff -r bb513b8b0caf -r cf31bf5fce72 submit_comment.php --- a/submit_comment.php Mon Apr 04 15:36:16 2022 +0200 +++ b/submit_comment.php Tue Sep 06 07:04:11 2022 +0200 @@ -17,13 +17,14 @@ $author = htmlspecialchars($_POST['Author']); $comment = htmlspecialchars($_POST['Comment']); $date = date('Y-m-d H:i:s'); + $header = 'X-Comment-Author: ' . $author; $message = 'Author: ' . $author . PHP_EOL . 'Date: ' . $date . PHP_EOL . PHP_EOL . $comment; $subject = 'New blog post comment on article ' . $slug; - mail($recipient, $subject, $message); + mail($recipient, $subject, $message, $header); ?>