Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/85314-tell-a-friend-script/
Share on other sites

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

 

Link to comment
https://forums.phpfreaks.com/topic/85314-tell-a-friend-script/#findComment-435324
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/85314-tell-a-friend-script/#findComment-437593
Share on other sites

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,

Link to comment
https://forums.phpfreaks.com/topic/85314-tell-a-friend-script/#findComment-439521
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.