aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-12-31 18:02:58 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-12-31 18:02:58 +0000
commit0221a06932376ea55bbeb65b736ad7b468538280 (patch)
tree1ae06b0c2d0b7dc0c54d25178d923449977ffacb /engine
parent907177e03cde4f37863bd0d437704ff11530a2dd (diff)
downloadelgg-0221a06932376ea55bbeb65b736ad7b468538280.tar.gz
elgg-0221a06932376ea55bbeb65b736ad7b468538280.tar.bz2
Closes #579: Allows configurable option $CONFIG->broken_mta = true. If set, this uses "\n" instead of "\r\n" in email headers.
git-svn-id: https://code.elgg.org/elgg/trunk@2524 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/notification.php16
-rw-r--r--engine/settings.example.php9
2 files changed, 20 insertions, 5 deletions
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index 1432979b6..ade0bd59b 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -248,10 +248,18 @@
if (is_callable('mb_encode_mimeheader')) {
$sitename = mb_encode_mimeheader($site->name,"UTF-8", "B");
}
- $headers = "From: \"$sitename\" <$from>\r\n"
- . "Content-Type: text/plain; charset=UTF-8; format=flowed\r\n"
- . "MIME-Version: 1.0\r\n"
- . "Content-Transfer-Encoding: 8bit\r\n";
+
+ $header_eol = "\r\n";
+ if (
+ (isset($CONFIG->broken_mta)) &&
+ ($CONFIG->broken_mta)
+ )
+ $header_eol = "\n"; // Allow non-RFC 2822 mail headers to support some broken MTAs
+
+ $headers = "From: \"$sitename\" <$from>{$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}";
if (is_callable('mb_encode_mimeheader')) {
$subject = mb_encode_mimeheader($subject,"UTF-8", "B");
diff --git a/engine/settings.example.php b/engine/settings.example.php
index 00323ccd8..50af236e4 100644
--- a/engine/settings.example.php
+++ b/engine/settings.example.php
@@ -111,7 +111,14 @@
// array('server1', 11211),
// array('server2', 11211)
//);
-
+
+ /**
+ * Some work-around flags.
+ */
+
+ // Try uncommenting the below if your notification emails are not being sent
+ // $CONFIG->broken_mta = true;
+
/**
* Url - I am not sure if this will be here ?
**/