Body/Subject/Headers Mix-up

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm an experienced PHP user, but am having a nightmare with one aspect
of PHPMailer. Can't find anyone else posting with the same problem on
any of the usual forums, so if anyone can help me, I'd be grateful.
Here goes:

Trying to post with PHP mailer. Here's the script:

$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "localhost"; // SMTP server
$mail->FromName = "Whatever";
$mail->From = "";
$mail->Subject = 'this is the subject';
$mail->Body = 'this is the body\n\n this is the 2nd line of the body';

The script sends ok, but what I get at the other end is this (I've
added the <> bits for clarity):

this is the body

this is the 2nd line of the body.

X-Priority: 3
X-Mailer: PHPMailer [version 1.70]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="iso-8859-1"

this is the body

this is the 2nd line of the body.

So for some reason, it's adding header tags to the BEGINNING (I think)
of the body.

Any thoughts, anyone ?


Site Timeline