diff --git a/contact.php b/contact.php index 42f48e3..88a4dfb 100644 --- a/contact.php +++ b/contact.php @@ -24,8 +24,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (empty($message)) $errors['message'] = 'Message cannot be empty.'; if (empty($errors)) { - $body = "Name: {$name}\nEmail: {$email}\nSubject: {$subject}\n\n{$message}"; - cybermailSend('sales@tomsjavajive.com', "Contact Form: {$subject}", $body, $name, $email); + $html = "

Name: {$name}
Email: {$email}
Subject: {$subject}

" . nl2br(htmlspecialchars($message)) . "

"; + sendEmail('sales@tomsjavajive.com', "Contact Form: {$subject}", $html); $sent = true; } }