diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-11 16:03:59 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-11 16:03:59 +0000 |
commit | 8790c82ac7218cc60562bff84817036cba66fa6c (patch) | |
tree | 3f87f7c647518bdb03c56476b719f2936c405fdf /engine/lib/notification.php | |
parent | 7130fca5be1f317f10d5b3a96de5a0857ac10332 (diff) | |
download | elgg-8790c82ac7218cc60562bff84817036cba66fa6c.tar.gz elgg-8790c82ac7218cc60562bff84817036cba66fa6c.tar.bz2 |
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
Diffstat (limited to 'engine/lib/notification.php')
-rw-r--r-- | engine/lib/notification.php | 8 |
1 files changed, 6 insertions, 2 deletions
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}";
|