$site['subject'] = "Safari on the River Ticket Confirmation"; $site['body'] = $request; // handle mail sending // Grab the FreakMailer class (already imported) //require_once($site['config_library'].'/MailClass.inc'); // instantiate the class $mailer = new FreakMailer(); // Set the subject $mailer->Subject = $site['subject']; // Body $mailer->Body = $site['body']; // Setup the from and Reply to $mailer->From = $site['from_email']; $mailer->FromName = $site['from_name']; if ($site['replyToEmail'] != '') { $mailer->AddReplyTo($site['replyToEmail'], $site['replyToName']); } // Add To addresses for ($i = 1; $i <= count($site['to_email']); $i++) { $mailer->AddAddress($site['to_email'][$i - 1]); } //$mailer->AddAddress('*****@*****.**', 'Bill Leddy'); // add CC addresses for ($i = 1; $i <= count($site['CC_email']); $i++) { $mailer->AddCC($site['CC_email'][$i - 1]); } // add BCC addresses for ($i = 1; $i <= count($site['BCC_email']); $i++) { $mailer->AddBCC($site['BCC_email'][$i - 1]); } //$mailer->AddBCC('*****@*****.**', 'Bill Leddy');
// the secret question is not shown to real users so must be empty // No longer actually send the spammers mail // $site array now exists $fromAddress = $site['from_email']; // instantiate the class $mailer = new FreakMailer(); $DEBUG = false; $mailer->SMTPDebug = $DEBUG; // Set the subject $mailer->Subject = "Web Contact"; // Body $mailer->Body = $request; // Setup the from and Reply to $mailer->From = $fromAddress; //$mailer->FromName = $_POST['Name']; $mailer->AddReplyTo($_POST['email'], $_POST['Name']); // test that it took a little while for the customer to complete the form // If not, we assume it's spam $interval = time() - intval($_POST['Code']); if ($interval < 5) { $mailer->Subject = "Web Contact for " . gethostname() . " - Too fast: " . $interval; $mailer->AddAddress('*****@*****.**', 'Bill Leddy'); } elseif ($CommentHasHttp_b === false) { // default to address is same as sender from config.php $mailer->AddAddress($site['from_email'], ''); $mailer->AddBCC('*****@*****.**', 'Bill Leddy'); } else { // this looks like spam $mailer->AddAddress('*****@*****.**', 'Bill Leddy'); } if (!$mailer->Send()) {