PDA

View Full Version : Mail Function


david07
10-03-2006, 02:43 PM
Can anyone help me with this mail function. It is HTML format. It works fine in most cases. However some emails before the main body (message) have, the message ID tag. So instead of it being in the header of the email. It is in the actual message.

Message-Id: <20061003131326.689C35C657@ozhlinblab bla> Date: Tue, 3 Oct 2006 23:13:26 +1000 (EST)

HTML HTML HTML HTML HTML

----- This is the code -----

$headers = "From:blabla <info@whatever.com>\r\n";
$headers .= "Reply-To: blabla <info@whatever.com>\r\n";
$headers .= "Content-type: text/html\r\n";

$subject = "blabla";
$bodymsg = mysql_result($result1,0,"bodymsg");
$to = "xxxxx@xxxxxx.net";

mail($to, $subject, $bodymsg, $headers);
----------------------------

Any help would be greatly appreciated.

Fumigator
10-03-2006, 03:29 PM
The code you show indicates the unwanted text is actually stored in your database because you are simply using the result of a query as the email message. So the problem is likely the code that inserts/updates your database.

david07
10-03-2006, 10:47 PM
The message that is appearing in the body. of the html email is

Message-Id: <20061003131326.689C35C657@ozhlinblab bla> Date: Tue, 3 Oct 2006 23:13:26 +1000 (EST)


Which is not stored in the databse.