We had the some problem when using sendmail. My mail client (Lotus Notes 5) showed the headers in the body.... and i had empty lines in the mail.
The problem was essentially fixed by changed the newline or linebreak definition in the mail system. Look for /lib/mail.php or so. See http://ez.no/developer/ez_publish_3/forum/developer/illegal_mime_chars_in_email_header for a similar problem with a one-liner, which should solve your problem.