From 8790c82ac7218cc60562bff84817036cba66fa6c Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 11 Mar 2009 16:03:59 +0000 Subject: Provide a From email address workaround for those with windows servers. See issue http://bugs.php.net/bug.php?id=28038 git-svn-id: https://code.elgg.org/elgg/trunk@3155 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/notification.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engine/lib/notification.php') diff --git a/engine/lib/notification.php b/engine/lib/notification.php index c12cf65ce..abd3fbb55 100644 --- a/engine/lib/notification.php +++ b/engine/lib/notification.php @@ -259,8 +259,12 @@ ($CONFIG->broken_mta) ) $header_eol = "\n"; // Allow non-RFC 2822 mail headers to support some broken MTAs - - $headers = "From: \"$sitename\" <$from>{$header_eol}" + + $from_email = "\"$sitename\" <$from>"; + if (strcasecmp(substr(PHP_OS, 0 , 3), 'WIN')) + $from_email = "$from"; // Windows is somewhat broken, so we use a different format from header + + $headers = "From: $from_email{$header_eol}" . "Content-Type: text/plain; charset=UTF-8; format=flowed{$header_eol}" . "MIME-Version: 1.0{$header_eol}" . "Content-Transfer-Encoding: 8bit{$header_eol}"; -- cgit v1.2.3