From ded01998b3e41445e366da2b8540d7b4dd2a0bbb Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 2 Mar 2013 07:14:27 +0100 Subject: [PATCH] Include a name in the e-mail sender --- config.json.example | 1 + public_html/includes/base.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.json.example b/config.json.example index e081f56..f0a7d06 100644 --- a/config.json.example +++ b/config.json.example @@ -38,6 +38,7 @@ }, "smtp": { "from": "admin@redonate.net", + "from_name": "ReDonate", "host": "localhost", "port": 25, "username": "root", diff --git a/public_html/includes/base.php b/public_html/includes/base.php index 774c564..7b34eb1 100644 --- a/public_html/includes/base.php +++ b/public_html/includes/base.php @@ -115,7 +115,7 @@ function send_mail($to, $subject, $text, $html) $sMessage = Swift_Message::newInstance(); $sMessage->setSubject($subject); $sMessage->setTo($to); - $sMessage->setFrom($cphp_config->smtp->from); + $sMessage->setFrom(array($cphp_config->smtp->from, $cphp_config->smtp->from_name)); $sMessage->setBody($text); $sMessage->addPart($html, "text/html");