Jump to content

PHP SMTP Email : text in header, not in body


russb

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

[code]<?php
require("mail.php");

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

$testmail->addrecipient("XXX", "To");
$testmail->setsender($_POST["email"], $_POST["name"]);
$testmail->setreturn($_POST["email"]);
$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"]);

$testmail->compilemail();
$testserver->openconnection();
$testserver->sendmail($testmail->headers, $testmail->message);
$testserver->closeconnection();
?>[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.