query($sql); $rxemail = mysql_result($result, 0, "email"); $rxname = mysql_result($result, 0, "name"); } $mail = "Dear $rxname,\n\n"; $mail .= "A very nice person has just contacted me, here is the info:\n"; $mail .= "Name: $_POST[name]\n"; $mail .= "Email: $_POST[email]\n\n"; $mail .= "Message: $_POST[message]\n\n"; $mail .= "Thanks,\n"; $mail .= "The EUCU Website.\n"; $headers = 'From: website@eucu.org.uk' . "\r\n" . 'Reply-To: website@eucu.org.uk' . "\r\n" . 'X-Mailer: Kahawa: PHP/' . phpversion(); $akismet->setCommentAuthor($_POST['name']); $akismet->setCommentAuthorEmail($_POST['email']); $akismet->setCommentContent($_POST['message']); $akismet->setPermalink('http://www.eucu.org.uk'); if ($akismet->isCommentSpam()) { if (mail("website@eucu.org.uk", "[POSSIBLE SPAM?] EUCU: Contact Form - $_POST[name]", $mail, $headers)) { $msg = "
Thanks! We've forwarded your message to $rxname.
"; $msg .= "They should get back to you shortly.
"; } else { $msg = "Sorry, something broke. Please try again later or email us directly."; } } else { if (mail("chris@ceejaycee.net, $rxemail", "EUCU: Contact Form - $_POST[name]", $mail, $headers)) { $msg = "Thanks! We've forwarded your message to $rxname.
"; $msg .= "They should get back to you shortly.
"; } else { $msg = "Sorry, something broke. Please try again later or email us directly."; } } } else { $selected = "selected"; if (isset($_GET['sendto'])) { $selected = ""; } $sql = "SELECT * FROM contacts ORDER BY id"; $result = $mysql->query($sql); $msg = "Use the form below to contact EUCU. If you want to contact a specific person, please use the dropdown box to select their name.
"; $msg .= "If you have any difficulties with this form, please email website@eucu.org.uk directly.
"; $msg .= "