From 8b73420936889a96261d3a4db630d815f74d81bc Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sat, 3 Feb 2018 20:50:23 +0100 Subject: [PATCH] Makes the Reply-To header e-mail address configurable. also uses the SITE_NAME constant as the sender name. --- config.php.dist | 5 ++++- models/Email.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.php.dist b/config.php.dist index d78de95..09945ec 100644 --- a/config.php.dist +++ b/config.php.dist @@ -14,6 +14,9 @@ const CACHE_KEY_PREFIX = 'hashru_'; const BASEDIR = __DIR__; const BASEURL = 'https://pics.hashru.nl'; // no trailing / +// Reply-To e-mail header address +const REPLY_TO_ADDRESS = 'no-reply@my.domain.tld' + // Assets dir and url, where assets are plentiful. (In wwwroot!) const ASSETSDIR = BASEDIR . '/public/assets'; const ASSETSURL = BASEURL . '/assets'; @@ -29,5 +32,5 @@ const DB_PASS = ''; const DB_NAME = 'hashru_pics'; const DB_LOG_QUERIES = false; -const SITE_TITLE = 'HashRU'; +const SITE_TITLE = 'HashRU Pics'; const SITE_SLOGAN = 'Nijmeegs Nerdclubje'; diff --git a/models/Email.php b/models/Email.php index 1829fd7..5ff0d4e 100644 --- a/models/Email.php +++ b/models/Email.php @@ -14,7 +14,7 @@ class Email $boundary = uniqid('sr'); if (empty($headers)) - $headers .= "From: HashRU Pics \r\n"; + $headers .= "From: " . SITE_TITLE . " <" . REPLY_TO_ADDRESS . ">\r\n"; // Set up headers. $headers .= "MIME-Version: 1.0\r\n";