cdnmama Posted January 10, 2008 Share Posted January 10, 2008 Hello, About a month ago, I had my webhost transfer a new client's website to my reseller account. The "tell a friend" script on that website is no longer working. I thought it might be due to being on a different server but when I asked my webhost support, they said there was no one to help me. I was hoping someone here might take a look for me. I thought this server info may be helpful.... Linux Distro: CentOS release 3.9 (Final) PHP Version: 4.4.7 Here is the PHP code.... <? $host = "www.livingeachday.com"; $send = isset($_GET["send"]) ? true : false; if($send) { if($_SERVER["SERVER_NAME"]==$host) { extract($_POST); foreach($FriendEmail AS $key=>$value) { $to = $value; $subject = "LivingEachDay.com Recommended by a Friend"; $body = "Hello,\r\n"; $body .= "I visited the website http://www.livingeachday.com and thought you would like to see this page. I hope you enjoy it as much as I did and will pass it on to others.\r\n"; $body .= "\r\n"; $body .= "$Referer\r\n"; $body .= "\r\n"; $body .= "Blessings,\r\n"; $body .= "$Fullname\r\n"; $xHeaders = "From: $Email\nX-Mailer: PHP/" . phpversion(); mail ($to, $subject, $body, $xHeaders); } $msg = "Thank you $Fullname! Your friends should be receiving their e-mail shortly."; } } require("includes/share.html"); ?> After filling in the tell a friend form, no mail arrives to the emails submitted in the form. Any suggestions? Thanks....Deb Quote Link to comment Share on other sites More sharing options...
priti Posted January 10, 2008 Share Posted January 10, 2008 hi, i think edit this line $xHeaders = "From: $Email\r\nX-Mailer: PHP v".phpversion()."\r\n"; check weather mail is been sent or not if(mail()) echo 'mail sent else echo 'mail is not sent'; And if you are sure that your mail is sent then simply first make a check in junk mails. and if none of them work kindly put note here :-) regards Quote Link to comment Share on other sites More sharing options...
cdnmama Posted January 13, 2008 Author Share Posted January 13, 2008 hi, i think edit this line $xHeaders = "From: $Email\r\nX-Mailer: PHP v".phpversion()."\r\n"; check weather mail is been sent or not if(mail()) echo 'mail sent else echo 'mail is not sent'; And if you are sure that your mail is sent then simply first make a check in junk mails. and if none of them work kindly put note here :-) regards Thanks for the reply priti but unfortunately I do not understand what you mean. Edit the line how? What do I do with.... if(mail()) echo 'mail sent else echo 'mail is not sent'; thanks, Deb Quote Link to comment Share on other sites More sharing options...
priti Posted January 15, 2008 Share Posted January 15, 2008 Hi, sorry for replying late was on holiday :-) .Try this if(mail ($to, $subject, $body, $xHeaders)) { echo 'mail is sent'; } else { echo 'mail is not sent'; } If mail is sent then check you folder's junk mail.Or it prnt mail is not sent means there is some problem.And if you feel mail is sent but not received at your end then check the mail queue.at times mails aget filter but this option sud be last one to consider first try to check all initial test. Regards, 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.