/************************************************************************* * cptRealty Real Estate Listing Application v1.1 * ©2005 Costa Pacific Technologies. All rights reserved. * http://www.costapacific.net * * File Info: email.php v1.0 * Updated: 01/18/2005 ************************************************************************/ require_once("conn.php"); require_once("includes.php"); //get the agent info if ($_GET[AgentID] <> "") { $agentID = $_GET[AgentID]; } if ($_POST[AgentID] <> "") { $agentID = $_POST[AgentID]; } $q1 = "select * from cpt_agents where AgentID = '$agentID' "; $r1 = mysql_query($q1) or die(mysql_error()); $a1 = mysql_fetch_array($r1); if(isset($_POST[z2]) or $_POST[z1] <> "") { $to = $a1[email]; $subject = $_POST[subject]; $message = $_POST[message]; $message .= "\n\nProperty:\n$site_url/info.php?id=$_POST[ListingID]\n\n"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_POST[u_name] < $_POST[u_email] >\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; mail($to, $subject, $message, $headers); $thankyou = "