" // Put it into Dreamweaver (WYSIWYG Editor), work on it and put it back. $theForm = <<
Your name:
Your email:
Enter the name(s) of your friend(s):
Enter the email(s) of your friend(s):

Your Message (optional):

$privacyPolicyLinkText
free php scripts

EOD; echo ($theForm); } ?> IsSMTP(); //Specify the use of the local server. //Should not have to authenticate. //If you get an error sending, use the Christian-Web-Masters.com forums to ask //How to change this script to use another server. //Or read the documentation for PHPMailer. $mail->Host = "localhost"; //If the site visitor entered thier email on the form, //then the mail sent will come from them. if ($_POST['your_email'] != "") { $mail->From = $_POST['your_email']; $mail->FromName = $_POST['your_name']; } //If not, the email will come from your admin email address. else { $mail->From = $adminEmail; $mail->FromName = $websiteName; } if ($_POST['friend_email1'] != "") { // Check for suspected spam content if (!spamcheck(array($_POST['friend_email1'],$subject,$_POST['friend_name1']))) { die('no spam please'); } //This takes the email address and name from form variables $mail->AddAddress($_POST['friend_email1'], $_POST['friend_name1']); //This tacs the name onto the subject line $mail->Subject = $_POST['friend_name1'] . $subject; //This tacs the name onto the message $mail->Body = $_POST['friend_name1'] . "\r\n" . $_POST['message'] . "\n\n" . $defaultMessageClose; //If you kept the notice set to 1, then this will Blind Copy you on the email. if ($notice == 1) { $mail->AddBCC ($adminEmail, 'Referal notice'); } //If the mail does not send... if(!$mail->Send()) { // This echo's the error message if the email did not send. // You could change the text in between the

tags. echo('

Mail could not be sent to ' . $_POST['friend_email1'] . ' Please use your back button to try them again.

'); } //If the mail does send... else { echo ('

Your message was successfully sent to ' . $_POST['friend_email1'] . '

'); } // Clear all addresses and attachments for the next one $mail->ClearAddresses(); } if ($_POST['friend_email2'] != "") { // Check for suspected spam content if (!spamcheck(array($_POST['friend_email3'],$subject,$_POST['friend_name3']))) { die('no spam please'); } //This takes the email address and name from form variables $mail->AddAddress($_POST['friend_email2'], $_POST['friend_name2']); //This tacs the name onto the subject line $mail->Subject = $_POST['friend_name2'] . $subject; //This tacs the name onto the message $mail->Body = $_POST['friend_name2'] . "\r\n" . $_POST['message'] . "\n\n" . $defaultMessageClose; //If you kept the notice set to 1, then this will Blind Copy you on the email. if ($notice == 1) { $mail->AddBCC ($adminEmail, 'Referal notice'); } //If the mail does not send... if(!$mail->Send()) { // This echo's the error message if the email did not send. // You could change the text in between the

tags. echo('

Mail could not be sent to ' . $_POST['friend_email2'] . ' Please use your back button to try them again.

'); } //If the mail does send... else { echo ('

Your message was successfully sent to ' . $_POST['friend_email2'] . '

'); } // Clear all addresses and attachments for the next one $mail->ClearAddresses(); } if ($_POST['friend_email3'] != "") { // Check for suspected spam content if (!spamcheck(array($_POST['friend_email3'],$subject,$_POST['friend_name3']))) { die('no spam please'); } //This takes the email address and name from form variables $mail->AddAddress($_POST['friend_email3'], $_POST['friend_name3']); //This tacs the name onto the subject line $mail->Subject = $_POST['friend_name3'] . $subject; //This tacs the name onto the message $mail->Body = $_POST['friend_name3'] . "\r\n" . $_POST['message'] . "\n\n" . $defaultMessageClose; //If you kept the notice set to 1, then this will Blind Copy you on the email. if ($notice == 1) { $mail->AddBCC ($adminEmail, 'Referal notice'); } //If the mail does not send... if(!$mail->Send()) { // This echo's the error message if the email did not send. // You could change the text in between the

tags. echo('

Mail could not be sent to ' . $_POST['friend_email3'] . ' Please use your back button to try them again.

'); } //If the mail does send... else { echo ('

Your message was successfully sent to ' . $_POST['friend_email3'] . '

'); } // Clear all addresses and attachments for the next one $mail->ClearAddresses(); } $return = <<Return to the page you left.

EOD; echo ($return); } if (isset($_POST['tellsubmit'])) { doTell($notice, $adminEmail, $subject, $websiteName, $defaultMessageClose, $link); } else { doTellForm($privacyPolicyLinkText, $privacyPolicyLinkURL, $defaultMessageIntro, $link); } ?>