$fields = array(); $values = array(); // If the honeypot is filled, don't send. if($_POST['hpoontey']) {     echo $error_message = "You are a robot."; } else { if(!empty($_POST)){ foreach($_POST as $field => $value){ array_push($fields, $field); array_push($values, $value); } $to = "susan@susanchagnon.com"; $subject = "Cobblestone Entertainment"; $client = "Susan Chagnon"; include("./contact-process.php"); $body = getBody($client, $fields, $values); require_once 'lib/swift_required.php'; $transport = Swift_SmtpTransport::newInstance('whm.logicalposition.com', 25) ->setUsername('cobblestoneenter') ->setPassword('SQLServer2016!'); $mailer = Swift_Mailer::newInstance($transport); $mailSubject = "Form Submission: ". $subject; $message = Swift_Message::newInstance() ->setSubject($mailSubject) ->setFrom(array('micrositecontact@logicalposition.com' => 'Logical Position')) ->setTo(array($to, "micrositecontact@logicalposition.com")) ->setBody($body, 'text/html'); // Create the Transport $result = $mailer->send($message); } } Cobblestone Entertainment | Contact