haz Posted February 22, 2008 Share Posted February 22, 2008 Hi my tell a friend page doesn't seem to send emails. I played around with the code so much its useless. Anyone have a better code for a tell a friend? I need it to send the current php page they are on in an email. Quote Link to comment Share on other sites More sharing options...
drisate Posted February 22, 2008 Share Posted February 22, 2008 post the one you have ans tell us what exacly happens when you submit it Quote Link to comment Share on other sites More sharing options...
haz Posted February 22, 2008 Author Share Posted February 22, 2008 thank you for your response I had a tell a friend page on my site and it used to send emails to whoever friends you want but it wasn't sending the corresponding job ID. I fixed that but now it doesn't send emails anymore at all. Also there is a message at the top of the page " No recipient addresses found in header X-Powered-By: PHP/5.2.3-20070601 Content-type: text/html Thank you for letting know your friends about the site. " Go to this page first: http://trans-united.net/searchforcareer.php Select any job from the list then go to the bottom of the page that opens up for the job you selected and click "Tell A Friend" Fill out your info for the friend and your info and hit submit. You won't get an email. I need to fix this. I have this code but I don't know if it should go before the form code or in the header of the page or before the <html>?? here is the code for the tell a friend page: <?php $id=$_GET["id"]; $subject="Hi Friend";$headers="From: ".$name."<".$email.">\r\n";$headers.="MIME-Version: 1.0\r\n";$headers.="Content-Type: text/plain; charset=\"iso-8859-1\"\r\n";$headers.= "X-Priority: 1\r\n";$headers.= "X-Mailer: PHP" . phpversion()."\r\n";$name=$_POST["name"];$email=$_POST["email"];$toname=$_POST["name1"];$toemail=$_POST["email1"].",";$message=$name. " refered you following page to browse.http://www.Trans-united.net/jobdetails.php?id=$id Moreover, ".$name." included following message for you.";$message.=$_POST["message"];//$success=mail($toemail,$subject,$message,$headers); if(isset($_POST["email2"]))//$success.=mail($_POST["email2"],$subject,$message,$headers); mail($_POST["email2"],$subject,$message,$headers);//$toemail.=$_POST["email2"].","; if(isset($_POST["email3"]))//$success.=mail($_POST["email3"],$subject,$message,$headers); mail($_POST["email3"],$subject,$message,$headers);//$toemail.=$_POST["email3"].","; if(isset($_POST["email4"])) mail($_POST["email4"],$subject,$message,$headers);//$success.=mail($_POST["email4"],$subject,$message,$headers);//$toemail.=$_POST["email4"].","; if(isset($_POST["email5"])) mail($_POST["email5"],$subject,$message,$headers);//$success.=mail($_POST["email5"],$subject,$message,$headers);//$toemail.=$_POST["email5"].","; if(isset($_POST["email6"])) mail($_POST["email6"],$subject,$message,$headers);//$success.=mail($_POST["email6"],$subject,$message,$headers);//$toemail.=$_POST["email6"].","; if(isset($_POST["email7"])) mail($_POST["email7"],$subject,$message,$headers);//$success.=mail($_POST["email7"],$subject,$message,$headers);//$toemail.=$_POST["email7"].",";//$headers .= 'CC: nthapa3@yahoo.com' . "\r\n";// $headers .= 'Bcc: birthdaycheck@example.com' . "\r\n"; $success=mail($toemail,$subject,$message,$headers); if($success) echo "Thank you for letting know your friends about the site.";else{echo "Mail couldn't be send.";} ?> 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.