Jump to content

Recommended Posts

Sorry for bugging everyone.

 

I'm really newbie with making emails send can anyone help me make a script please.

 

This is how the refer page looks.

 

http://58.173.92.23/test/index/referrals/referrals.htm

 

My friend sent me a example of the script but i don't understand it can anyone help me please.

 

<?


// do nothing to these variables; they collect information from the form
$Email = $_POST['Email'];
$Name = $_POST['Name'];
$F1Name = $_POST['F1Name'];
$F2Name = $_POST['F2Name'];
$F3Name = $_POST['F3Name'];
$F1Email = $_POST['F1Email'];
$F2Email = $_POST['F2Email'];
$F3Email = $_POST['F3Email'];

// subject line - add your own subject here ($name is the referrer name);

$subject = "This is a referral from $name";

// Referral message //
$referral_message = "
Look at this great site I found. I think you'll like it. <br>
<a href='http://www.conversionchronicles.com/'>http://www.conversionchronicles.com/</a><br>
";
// End of referral message //
$msg1 = "<font face='Verdana,Geneva,Arial,Helvetica,sans-serif' size='2' color='#000000'>
Hi $F1Name,<br>
$referral_message<br>
$Name<br>
<br>
</font>";
$mail1 = new mime_mail();
$mail1->from = $Email;
$mail1->headers = "Errors-To: [email protected]";
$mail1->to = $F1Email;
$mail1->subject = $subject;
$mail1->body = $msg1;
$mail1->send();
$msg2 = "<font face='Verdana,Geneva,Arial,Helvetica,sans-serif' size='2' color='#000000'>
Hi $F2Name,<br>
$referral_message<br>
$Name<br>
<br>
</font>";
$mail2 = new mime_mail();
$mail2->from = $Email;
$mail2->headers = "Errors-To: [email protected]";
$mail2->to = $F2Email;
$mail2->subject = $subject;
$mail2->body = $msg2;
$mail2->send();
$msg3 = "<font face='Verdana,Geneva,Arial,Helvetica,sans-serif' size='2' color='#000000'>
Hi $F3Name,<br>
$referral_message<br>
$Name<br>
<br>
</font>";
$mail3 = new mime_mail();
$mail3->from = $Email;
$mail3->headers = "Errors-To: [email protected]";
$mail3->to = $F3Email;
$mail3->subject = $subject;
$mail3->body = $msg3;
$mail3->send();
// If mail 1 at least is sent then inform the sender 
if($mail1) 
{ 
$Recipient_Email	= "[email protected]";
$Subject	= "Referral from $Name";
$Message = "A referral has been made from your web form.\n The referrer was; $Name with the email address $Email\n The recipients were; $F1Email $F2Email $F3Email";
$From = "$Email";
mail("$Recipient_Email","$Subject","$Message","From: $From");
}
// change return URL to your own thanks for referring a friend page.
$ReturnURL = "http://www.conversionchronicles.com/free_refer.php";
header("Location: $ReturnURL");
?>

Link to comment
https://forums.phpfreaks.com/topic/143218-please-help-me-with-my-refer-page/
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.