summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authorroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-03-23 22:32:47 +0000
committerroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-03-23 22:32:47 +0000
commit3e94d97cdbfd9926ca1182654c60b88d77871124 (patch)
tree3b7bf1caed4bc0755ec3e76c520cb6fb7ba565c3 /roundcubemail/program/steps/mail/sendmail.inc
parent21f5cae2c2ac9a4e6db08ca05f532be40eabd913 (diff)
Started implementing search function
git-svn-id: https://svn.roundcube.net/trunk@171 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/sendmail.inc')
-rw-r--r--roundcubemail/program/steps/mail/sendmail.inc11
1 files changed, 9 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc
index 70baba039..33f023de1 100644
--- a/roundcubemail/program/steps/mail/sendmail.inc
+++ b/roundcubemail/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);