|
Posted by itsterry on 10/18/05 13:20
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 = "whatever@whatever.com";
$mail->Subject = 'this is the subject';
$mail->Body = 'this is the body\n\n this is the 2nd line of the body';
$mail->AddAddress('what@ever.com')
$mail->Send();
The script sends ok, but what I get at the other end is this (I've
added the <> bits for clarity):
<subject>
this is the body
</subject>
<body>
this is the 2nd line of the body.
Message-ID: <longhexstring-ignore@whatever.com>
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.
</body>
So for some reason, it's adding header tags to the BEGINNING (I think)
of the body.
Any thoughts, anyone ?
Terry
Navigation:
[Reply to this message]
|