// web site owner name and email
$OWNER_NAME = 'J&E Custom Homes';
$OWNER_EMAIL = 'info@jandecustomhomes.com';
// set 1 if you want to send an autoresponse to the form submitter
$AUTORESPONDER = 1;
// autoresponder from name and email
$AUTORESPONDER_FROM_NAME = 'J&E Custom Homes';
$AUTORESPONDER_FROM_EMAIL = 'J&E Custom Homes';
// autoresponce subject
$AUTORESPONDER_SUBJECT = 'J&E Website Form Submission';
// autoresponce text
$AUTORESPONDER_TEXT = 'Your submission from jandecustomhomes.com has been received. Thank you!';
// the site owner will get submitted form data from the following name/email
$FROM_NAME = 'J&E Website Mailer';
$FROM_EMAIL = 'do-not-respond@jandecustomhomes.com';
$CONTACT_SUBJECT = 'You have a new message submitted.';
define('CHARSET', 'windows-1252');
define('EMAIL_TRANSPORT', 'smtp');
define('EMAIL_LINEFEED', "\n");
include('includes/email_common.php');
$name = (isset($_POST['name']) ? net_db_prepare_input($_POST['name']) : '');
$email = (isset($_POST['email']) ? net_db_prepare_input($_POST['email']) : '');
$phone = (isset($_POST['phone']) ? net_db_prepare_input($_POST['phone']) : '');
$subject = (isset($_POST['subject']) ? net_db_prepare_input($_POST['subject']) : '');
$error = false;
if (isset($_GET['action']) && $_GET['action'] == 'send') {
// if !error EOF
if (empty($name)) {
$error = true;
}
if (!net_validate_email($email)) {
$error = true;
}
if (empty($subject)) {
$error = true;
}
if (!$error) {
$name = sanitize($name);
$email = sanitize($email);
$phone = sanitize($phone);
$subject = sanitize($subject);
$date = strtoupper(date('S')) . date(' M d h:i:s Y');
$what_to_send =
'The Contact form has been submitted:
' .
'Date: ' . $date . '
' .
'IP Address: ' . getenv('REMOTE_ADDR') . '
' .
'Name: ' . $name . '
' .
'E-Mail: ' . '' . $email . '
' .
'Phone: ' . ($phone ? $phone : '-- none --') . '
' .
'Subject:
' . $subject . '
';
$mimemessage = new email(array('X-Mailer: laptoprepairdirect.com'));
$mimemessage->add_html(nl2br($what_to_send));
$mimemessage->build_message();
$mimemessage->send(
$OWNER_NAME,
$OWNER_EMAIL, '',
$FROM_NAME . ' <' . $FROM_EMAIL . '>',
$CONTACT_SUBJECT);
if ($AUTORESPONDER) {
$mimemessageA = new email(array('X-Mailer: laptoprepairdirect.com'));
$mimemessageA -> add_html($AUTORESPONDER_TEXT);
$mimemessageA -> build_message();
$mimemessageA -> send(
$name,
$email, '',
$OWNER_NAME . ' <' . $OWNER_EMAIL . '>',
$AUTORESPONDER_SUBJECT);
}
header('Location: contactus.php?sent');
exit;
} else {
}
} else {
// echo 'HERE';
}
?>
J&E Custom Homes
 |
Quality - Luxury - Elegance |
|