\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; if($a1[NewsletterType] == "plain") { $message = strip_tags($_POST[message]); $message .= "\n\n========================\nTo unsubscribe, use this link:\n"; $message .= "http://$_SERVER[HTTP_HOST]/realestate/u.php?id=$a1[AgentID]"; } else { $message = $_POST[message]; $message .= "

Click here to unsubscribe."; } $message = stripslashes($message); mail($to, $subject, $message, $headers); $i++; } //add the message to the mail archive $t = time(); $q1 = "insert into yellow_mail_archive set subject = '$_POST[subject]', message = '$_POST[message]', MailDate = '$t' "; mysql_query($q1) or die(mysql_error()); echo "
$i emails were sent!

"; } //get the subscribers number $q1 = "select count(*) from yellow_agents where news = 'y' "; $r1 = mysql_query($q1) or die(mysql_error()); $a1 = mysql_fetch_array($r1); if($a1[0] == '0') { echo "
You have no subscribers at your mailing list!"; exit(); } ?>
 
CLASSIFIEDS v2.0
 
You have subscribers.
 SEND NEWSLETTER
Subject:
Message: