summaryrefslogtreecommitdiff
path: root/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-03-23 22:32:47 +0000
committerthomascube <thomas@roundcube.net>2006-03-23 22:32:47 +0000
commit4647e1bbb5beba82605695c4dc989ca867e53244 (patch)
treee4c86b406503170cd069b0fbd05b034073113ceb /program/steps/mail/sendmail.inc
parentd1dfb1e65c593fcf3e5d5d0db6c386b89552f73f (diff)
Started implementing search function
Diffstat (limited to 'program/steps/mail/sendmail.inc')
-rw-r--r--program/steps/mail/sendmail.inc11
1 files changed, 9 insertions, 2 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 70baba039..33f023de1 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -159,9 +159,16 @@ if (!empty($CONFIG['generic_message_footer']))
}
}
-
+// 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);