diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/config/sendmail.php | 1 | ||||
-rw-r--r-- | core/libraries/Sendmail.php | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/core/config/sendmail.php b/core/config/sendmail.php index 5da84abf..fd9c81dc 100644 --- a/core/config/sendmail.php +++ b/core/config/sendmail.php @@ -26,3 +26,4 @@ $config["from"] = "admin@gallery3.com"; $config["line_length"] = 70; $config["reply_to"] = "public@gallery3.com"; +$config["header_separator"] = "\n"; diff --git a/core/libraries/Sendmail.php b/core/libraries/Sendmail.php index 3da641ed..e634a7a3 100644 --- a/core/libraries/Sendmail.php +++ b/core/libraries/Sendmail.php @@ -23,6 +23,7 @@ class Sendmail_Core { protected $message; protected $headers; protected $line_length = 70; + protected $header_separator = "\r\n"; /** * In test mode this gets the message that would have been set @@ -85,7 +86,12 @@ class Sendmail_Core { $key = ucfirst($key); $headers[] = "$key: $value"; } - $headers = implode("\r\n", $headers); + + /* + * The docs say headers should be separated by \r\n, but occasionaly that doesn't work and you + * need to use a single \n. This can be set in config/sendmail.php + */ + $headers = implode($this->header_separator, $headers); $message = wordwrap($this->message, $this->line_length, "\n"); if (!TEST_MODE) { |