Hi, I am trying to submit the contents of a form via email to a set address and then send a confirmation email based on the entered email address from the form.
Sending the confirmation email works fine but the second email confirming delievery of the email is not working. Right now the script is not picking up the user email varible from the form. The email field name is biz_email and you can see where I set the varible in the script $mailto=$biz_email. When I test the form I get the first email without any problems but the second email comes back to me with the error stating the user is unknown and I see nobody@"domain name" in the To: field. So I guess the varible from the form is not being picked up. Any ideas Below is the relevent code - I would greatly appreciate any help - thanks if (isset($PHP_MAIL_FORM)) { include("classes/MailClass.php"); $tgFormMail=new phpMailer(); $mailto= "Webmaster Form Submission email address"; $subject="Basic Registration Submission Form"; $from="Website"; $FormMail_sent ="home.php"; if ($from ==""){ $lol =$HTTP_HOST; $a = str_replace ("www.","",$lol); $replaced = "webmaster@$a"; $from = $replaced; } if($subject ==""){ $subject ="Server Generated Email"; } $i=0; $arr = array($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $mex = $mex."$key: $val\n"; } $FormMail->AddSender($from,$HTTP_HOST); $FormMail->AddAddress($mailto,$mailto); $FormMail->SetSubject($subject); $FormMail->AddBody($mex); $FormMail->Send(); if($tgFormMail_sent != ""){ header("Location: $FormMail_sent"); } } if ($PHP_MAIL_FORM=true){ include("classes/MailClass.php"); $FormMail=new phpMailer(); $mailto=$biz_email; $subject1="Your Submission has been recieved"; $message="Submission email body"; $FormMail->AddSender($from,$HTTP_HOST); $FormMail->AddAddress($to,$to); $FormMail->SetSubject($subject1); $FormMail->AddBody($messsage); $FormMail->Send(); if($tgFormMail_sent != ""){ header("Location: $FormMail_sent"); } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]