<?php
$Body=
'Full Name:	'.$_POST['Name'].'<br /><br /> 
 Email:	'.$_POST['Email'].'<br /><br />
 Company:	'.$_POST['Company'].'<br /><br />
 Phone:	'.$_POST['Phone'].'<br /><br />
 Message:	'.$_POST['Message'].'
';


require 'PHPMailer/PHPMailerAutoload.php';

$mail = new PHPMailer;

//$mail->SMTPDebug = 3;                               // Enable verbose debug output

$mail->isSMTP();                                      // Set mailer to use SMTP
$mail->Host = 'orbosyscorp.com';  // Specify main and backup SMTP servers
$mail->SMTPAuth = true;                               // Enable SMTP authentication
$mail->Username = 'info@orbosyscorp.com';                 // SMTP username
$mail->Password = 'Info123*';                           // SMTP password
//$mail->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
$mail->Port = 25;                                    // TCP port to connect to

$mail->setFrom('info@orbosyscorp.com', 'Query');
//$mail->addAddress('joe@example.net', 'Joe User');     // Add a recipient
//$mail->addAddress('offshore@orbosyscorp.com');               // Name is optional
$mail->addAddress('orbosyscorp@gmail.com');               // Name is optional
//$mail->addReplyTo($_POST['Email'], $_POST['Name']');
//$mail->addCC('cc@example.com');
//$mail->addBCC('bcc@example.com');

//$mail->addAttachment('/var/tmp/file.tar.gz');         // Add attachments
//$mail->addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name
$mail->isHTML(true);                                  // Set email format to HTML

$mail->Subject = 'New Offshore Query';
$mail->Body    = $Body;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

if(!$mail->send()) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
    echo 'Message has been sent';
	header('Location: thanks.html');
}

 ?>