FirePhoenix Posted February 25, 2007 Share Posted February 25, 2007 I am trying to send email from a form can someone please tell me if this is right This is the Action page <?php include ("config.php") $fname = $_POST ["fname"]; $lname = $_POST ["lname"]; $hphone = $_POST ["hphone"]; $wphone = $_POST ["wphone"]; $address = $_POST ["address"]; $apt = $_POST ["apt"]; $city = $_POST ["city"]; $state = $_POST ["state"]; $zipcode = $_POST ["zipcode"]; $tvnumber = $_POST ["tvnumber"]; $sdtv = $_POST ["sdtv"]; $hdtv = $_POST ["sdtv"]; $to = "$email_apply"; $subject = "Dish Network Application"; $body = "First Name:",$fname/n,"Last Name:",$lname/n,"Home Phone",$hphone/n,"Work Phone:",$wphone/n,"Address:"$address/n,"Apt#:",$apt/n,"City",$city/n,"State:",$state/n,"Zip Code:",$zipcode/n,"Number of TV's:",$tvnumber/n,"SDTV:",$sdtv/n,"HDTV:",$hdtv/n; $headers = "From: Website/n"; mail($to,$subject,$body,$headers); ?> I dont have away to test it and it has to work when I upload it so any help will be much apriciated...Thank you Quote Link to comment Share on other sites More sharing options...
severndigital Posted February 25, 2007 Share Posted February 25, 2007 looks ok to me, but a few things. 1. not sure if mail servers will see the header you have as vaild. If not, they will kick your email back as spam. (can someone else vaildate this?) 2. i've had problems in the past with the mail() function. Depending on your host, you mave have to send the mail() function with a -f command. I've only ever had to do this twice but the problem does exists. unfortunate you don't have a place to test your scripts. Quote Link to comment Share on other sites More sharing options...
FirePhoenix Posted February 25, 2007 Author Share Posted February 25, 2007 thank you for your suggestions I do apriciate it I think I will just take that header out I dont really need it anyway...thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.