Skip to content
Snippets Groups Projects
Commit 2a9ce4a9 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1909 from greezybacon/issue/lf-defl-mail-eol


email: Use \n as the default line ending

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 553c81e5 04d6a027
Branches
Tags
No related merge requests found
......@@ -326,25 +326,13 @@ class Mailer {
$reply_tag = $cfg->getReplySeparator() . '<br/><br/>';
}
// Use Mail_mime default initially
$eol = null;
// Use general failsafe default initially
$eol = "\n";
// MAIL_EOL setting can be defined in `ost-config.php`
if (defined('MAIL_EOL') && is_string(MAIL_EOL)) {
$eol = MAIL_EOL;
}
// The Suhosin patch will muck up the line endings in some
// cases
//
// References:
// https://github.com/osTicket/osTicket-1.8/issues/202
// http://pear.php.net/bugs/bug.php?id=12032
// http://us2.php.net/manual/en/function.mail.php#97680
elseif ((extension_loaded('suhosin') || defined("SUHOSIN_PATCH"))
&& !$this->getSMTPInfo()
) {
$eol = "\n";
}
$mime = new Mail_mime($eol);
// If the message is not explicitly declared to be a text message,
......
......@@ -71,7 +71,7 @@ define('TABLE_PREFIX','%CONFIG-PREFIX');
#
# Mail Options
# ---------------------------------------------------
# Option: MAIL_EOL (default: \r\n)
# Option: MAIL_EOL (default: \n)
#
# Some mail setups do not handle emails with \r\n (CRLF) line endings for
# headers and base64 and quoted-response encoded bodies. This is an error
......@@ -88,7 +88,7 @@ define('TABLE_PREFIX','%CONFIG-PREFIX');
# https://github.com/osTicket/osTicket-1.8/issues/759
# https://github.com/osTicket/osTicket-1.8/issues/1217
# define(MAIL_EOL, "\n");
# define(MAIL_EOL, "\r\n");
#
# HTTP Server Options
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment