$value){ if (!is_array($value)) { $message .= "\n".$key." : ".$value; } else { foreach ($_POST[$key] as $itemvalue) { $message .= "\n".$key." : ".$itemvalue; } } } mail($mailto, $subject, stripslashes($message), $header); ?>verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']); if (!$response->isSuccess()) { header('Location: ./info-request_fail.php'); exit; } } function ValidateEmail($email) { $pattern = '/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i'; return preg_match($pattern, $email); } if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'form1') { $mailto = 'info@mcl-associates.com'; $mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto; $subject = 'Contact Us'; $message = 'Values submitted from web site form:'; $success_url = './info-request_success.php'; $error_url = './info-request_fail.php'; $error = ''; $eol = "\n"; $boundary = md5(uniqid(time())); $header = 'From: '.$mailfrom.$eol; $header .= 'Reply-To: '.$mailfrom.$eol; $header .= 'MIME-Version: 1.0'.$eol; $header .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'.$eol; $header .= 'X-Mailer: PHP v'.phpversion().$eol; if (!ValidateEmail($mailfrom)) { $error .= "The specified email address is invalid!\n
"; } if (!empty($error)) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $error, $errorcode); echo $errorcode; exit; } $internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response"); $message .= $eol; $message .= "IP Address : "; $message .= $_SERVER['REMOTE_ADDR']; $message .= $eol; $logdata = ''; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (!is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } } } $body = 'This is a multi-part message in MIME format.'.$eol.$eol; $body .= '--'.$boundary.$eol; $body .= 'Content-Type: text/plain; charset=ISO-8859-1'.$eol; $body .= 'Content-Transfer-Encoding: 8bit'.$eol; $body .= $eol.stripslashes($message).$eol; if (!empty($_FILES)) { foreach ($_FILES as $key => $value) { if ($_FILES[$key]['error'] == 0) { $body .= '--'.$boundary.$eol; $body .= 'Content-Type: '.$_FILES[$key]['type'].'; name='.$_FILES[$key]['name'].$eol; $body .= 'Content-Transfer-Encoding: base64'.$eol; $body .= 'Content-Disposition: attachment; filename='.$_FILES[$key]['name'].$eol; $body .= $eol.chunk_split(base64_encode(file_get_contents($_FILES[$key]['tmp_name']))).$eol; } } } $body .= '--'.$boundary.'--'.$eol; if ($mailto != '') { mail($mailto, $subject, $body, $header); } header('Location: '.$success_url); exit; } ?> mcl_contact_us
© MCL & Associates, Inc. 2001 - 2019
MCL & Associates, Inc.
“Making Management Consulting Affordable”
A Woman-Owned Company.
Contact Us

For more information about MCL or to schedule a free initial consultation, please contact us at the
e-mail link (below), or call us at:

20 North Pointe Drive
Fredericksburg, VA  22405

Tel: 540-693-0090
Fax: 540-372-1413
Email: info@mcl-associates.com

Download: Capability Statement
No part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical,
photocopying, recording, or otherwise), or for any purpose, without the express written permission of MCL& Associates, Inc. Copyright 2001 - 2019 MCL & Associates, Inc.
All rights reserved.

The lightning bolt is the logo and a trademark of MCL & Associates, Inc.  All rights reserved.
The motto “Making Management Consulting Affordable” ™ is a trademark of MCL & Associates, Inc.  All rights reserved
.