Index: mimemail.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/mimemail/mimemail.inc,v retrieving revision 1.16 diff -u -Ffunction -r1.16 mimemail.inc --- mimemail.inc 11 Jun 2006 05:33:10 -0000 1.16 +++ mimemail.inc 31 Aug 2006 15:07:58 -0000 @@ -38,13 +38,13 @@ function mimemail_rfc_headers($headers) if (strlen($value) > 60) { //if there's a semicolon, use that to separate if (count($array = preg_split('/;\s*/',$value)) > 1) { - $value = trim(join(";\n ", $array)); + $value = trim(join(";\r\n ", $array)); } else { - $value = wordwrap($value,50,"\n ",false); + $value = wordwrap($value,50,"\r\n ",false); } } - $header .= "$key: $value\n"; + $header .= "$key: $value\r\n"; } return trim($header); } @@ -62,7 +62,6 @@ function mimemail_address($address) { // it's an array containing 'mail' and/or 'name' if (isset($address['mail'])) { - $output = ''; if (empty($address['name'])) { return $address['mail']; } else { @@ -252,7 +251,7 @@ function mimemail_multipart_body($parts, ); if (!$sub_part) { $headers['MIME-Version'] = '1.0'; - $body = "This is a multi-part message in MIME format.\n"; + $body = "This is a multi-part message in MIME format.\r\n"; } foreach ($parts as $part) { @@ -307,11 +306,11 @@ function mimemail_multipart_body($parts, $part_body = chunk_split(base64_encode(file_get_contents($part['file']))); } - $body .= "\n--$boundary\n"; - $body .= mimemail_rfc_headers($part_headers)."\n\n"; + $body .= "\r\n--$boundary\r\n"; + $body .= mimemail_rfc_headers($part_headers)."\r\n\r\n"; $body .= $part_body; } - $body .= "\n--$boundary--\n"; + $body .= "\r\n--$boundary--\r\n"; return array('headers' => $headers, 'body' => $body); }