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

Merge pull request #1248 from greezybacon/issue/mail-eol


email: Add MAIL_EOL setting to ost-config.php file

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 41e44183 d3bf4991
Branches
Tags
No related merge requests found
...@@ -155,6 +155,13 @@ class Mailer { ...@@ -155,6 +155,13 @@ class Mailer {
} }
} }
// Use Mail_mime default initially
$eol = null;
// 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 // The Suhosin patch will muck up the line endings in some
// cases // cases
// //
...@@ -162,12 +169,12 @@ class Mailer { ...@@ -162,12 +169,12 @@ class Mailer {
// https://github.com/osTicket/osTicket-1.8/issues/202 // https://github.com/osTicket/osTicket-1.8/issues/202
// http://pear.php.net/bugs/bug.php?id=12032 // http://pear.php.net/bugs/bug.php?id=12032
// http://us2.php.net/manual/en/function.mail.php#97680 // http://us2.php.net/manual/en/function.mail.php#97680
if ((extension_loaded('suhosin') || defined("SUHOSIN_PATCH")) elseif ((extension_loaded('suhosin') || defined("SUHOSIN_PATCH"))
&& !$this->getSMTPInfo()) && !$this->getSMTPInfo()
$mime = new Mail_mime("\n"); ) {
else $eol = "\n";
// Use defaults }
$mime = new Mail_mime(); $mime = new Mail_mime($eol);
// If the message is not explicitly declared to be a text message, // If the message is not explicitly declared to be a text message,
// then assume that it needs html processing to create a valid text // then assume that it needs html processing to create a valid text
......
...@@ -16,19 +16,6 @@ ...@@ -16,19 +16,6 @@
$Id: $ $Id: $
**********************************************************************/ **********************************************************************/
/**
* If you have a strange HTTP server configuration and osTicket cannot
* discover the URL path of where your osTicket is installed, define
* ROOT_PATH here.
*
* The ROOT_PATH is the part of the URL used to access your osTicket
* helpdesk before the '/scp' part and after the hostname. For instance, for
* http://mycompany.com/support', the ROOT_PATH should be '/support/'
*
* ROOT_PATH *must* end with a forward-slash!
*/
# define('ROOT_PATH', '/support/');
#Disable direct access. #Disable direct access.
if(!strcasecmp(basename($_SERVER['SCRIPT_NAME']),basename(__FILE__)) || !defined('INCLUDE_DIR')) if(!strcasecmp(basename($_SERVER['SCRIPT_NAME']),basename(__FILE__)) || !defined('INCLUDE_DIR'))
die('kwaheri rafiki!'); die('kwaheri rafiki!');
...@@ -48,13 +35,19 @@ define('SECRET_SALT','%CONFIG-SIRI'); ...@@ -48,13 +35,19 @@ define('SECRET_SALT','%CONFIG-SIRI');
#Default admin email. Used only on db connection issues and related alerts. #Default admin email. Used only on db connection issues and related alerts.
define('ADMIN_EMAIL','%ADMIN-EMAIL'); define('ADMIN_EMAIL','%ADMIN-EMAIL');
#Mysql Login info # Database Options
# ---------------------------------------------------
# Mysql Login info
define('DBTYPE','mysql'); define('DBTYPE','mysql');
define('DBHOST','%CONFIG-DBHOST'); define('DBHOST','%CONFIG-DBHOST');
define('DBNAME','%CONFIG-DBNAME'); define('DBNAME','%CONFIG-DBNAME');
define('DBUSER','%CONFIG-DBUSER'); define('DBUSER','%CONFIG-DBUSER');
define('DBPASS','%CONFIG-DBPASS'); define('DBPASS','%CONFIG-DBPASS');
# Table prefix
define('TABLE_PREFIX','%CONFIG-PREFIX');
#
# SSL Options # SSL Options
# --------------------------------------------------- # ---------------------------------------------------
# SSL options for MySQL can be enabled by adding a certificate allowed by # SSL options for MySQL can be enabled by adding a certificate allowed by
...@@ -75,7 +68,42 @@ define('DBPASS','%CONFIG-DBPASS'); ...@@ -75,7 +68,42 @@ define('DBPASS','%CONFIG-DBPASS');
# define('DBSSLCERT','/path/to/client.crt'); # define('DBSSLCERT','/path/to/client.crt');
# define('DBSSLKEY','/path/to/client.key'); # define('DBSSLKEY','/path/to/client.key');
#Table prefix #
define('TABLE_PREFIX','%CONFIG-PREFIX'); # Mail Options
# ---------------------------------------------------
# Option: MAIL_EOL (default: \r\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
# and a violation of the internet mail RFCs. However, because this is also
# outside the control of both osTicket development and many server
# administrators, this option can be adjusted for your setup. Many folks who
# experience blank or garbled email from osTicket can adjust this setting to
# use "\n" (LF) instead of the CRLF default.
#
# References:
# http://www.faqs.org/rfcs/rfc2822.html
# https://github.com/osTicket/osTicket-1.8/issues/202
# https://github.com/osTicket/osTicket-1.8/issues/700
# https://github.com/osTicket/osTicket-1.8/issues/759
# https://github.com/osTicket/osTicket-1.8/issues/1217
# define(MAIL_EOL, "\n");
#
# HTTP Server Options
# ---------------------------------------------------
# Option: ROOT_PATH (default: <auto detect>, fallback: /)
#
# If you have a strange HTTP server configuration and osTicket cannot
# discover the URL path of where your osTicket is installed, define
# ROOT_PATH here.
#
# The ROOT_PATH is the part of the URL used to access your osTicket
# helpdesk before the '/scp' part and after the hostname. For instance, for
# http://mycompany.com/support', the ROOT_PATH should be '/support/'
#
# ROOT_PATH *must* end with a forward-slash!
# define('ROOT_PATH', '/support/');
?> ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment