From 4647e1bbb5beba82605695c4dc989ca867e53244 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Thu, 23 Mar 2006 17:32:47 -0500 Subject: [PATCH] Started implementing search function --- program/steps/mail/sendmail.inc | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 70baba0..33f023d 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -159,9 +159,16 @@ } } - +// try to autodetect operating system and use the correct line endings // use the configured delimiter for headers -$header_delm = $CONFIG['mail_header_delimiter'] ? $CONFIG['mail_header_delimiter'] : "\r\n"; +if (!empty($CONFIG['mail_header_delimiter'])) + $header_delm = $CONFIG['mail_header_delimiter']; +else if (strtolower(substr(PHP_OS, 0, 3)=='win')) + $header_delm = "\r\n"; +else if (strtolower(substr(PHP_OS, 0, 3)=='mac')) + $header_delm = "\r\n"; +else + $header_delm = "\n"; // create PEAR::Mail_mime instance $MAIL_MIME = new Mail_mime($header_delm); -- Gitblit v1.9.1