aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 ?
**/