Jump to content


This topic is now archived and is closed to further replies.


PHP SMTP Email : text in header, not in body

Recommended Posts

hello: i have a windows hosting account so i need to use SMPT email and have been looking at various ways to do this. none of them are working right and i've tried and modified a number of scripts including the one recommended in the snippets forums.

i'm POSTING form data from flash into the email.php which should send the mail.

the mail IS getting sent with the proper headers, however the body text does not show up but if i look in the Properties, all the correct text is in the email header information, can anyone explain or help me figure out why this is doing it, the info is getting sent in with the email, but doesn't show up in the actually body area. thanks


$testmail = new mimemail();
$testserver = new smtpmail("XXX");

$testmail->addrecipient("XXX", "To");
$testmail->setsender($_POST["email"], $_POST["name"]);
$testmail->setsubject("Info Request");

$testmail->setplain($_POST["name"] . "\r\n" . $_POST["businessname"] . "\r\n" . $_POST["address1"] . "\r\n" . $_POST["address2"] . "\r\n" . $_POST["email"] . "\r\n" . $_POST["phone"] . "\r\n" . $_POST["website"] . "\r\n" . $_POST["price"] . "\r\n" . $_POST["hear"] . "\r\n" . $_POST["comment"]);

$testserver->sendmail($testmail->headers, $testmail->message);

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.