<?PHP
	// include('../_connect.php');
	// $theTable = 'INVOICE_contacts';
	// $sql = 'select 1 from `'&$theTable&'`';
	// echo $sql;
	
	// $val = mysql_query($sql);

	// if($val !== FALSE) {
	//    print("Exists");
	// } else {
	//    print("Doesn't exist");
	// }


	// include('_functions.php');
	// $guid = getGUID();
	// $email = 'scott.reph@gmail.com';
	// $order = '7894';
	// $name = 'Alpha';
	// $last = 'Reph';
	// $count = '1-5';
	// $dbclose = true;
	// echo emailCustomer($guid, $email, $order, $count, $name, $last, $dbclose);
	// echo 'done';

	// $to_email = $email;
	// $subject = 'Testing PHP Mail';
	// $message = 'This mail is sent using the PHP mail function';
	// $headers = 'From: ' . $email;
	// echo mail($to_email,$subject,$message,$headers);
	// include('PHPMailer/src/PHPMailer.php');
// require 'PHPMailerAutoload.php';


$data['hostname'] = NULL;
$data['ip'] = NULL;
$var = gethostname();
if ($var === FALSE) {
  $var = NULL;
} else {
  $data['hostname'] = $var;
  $data['ip']   = gethostbyname($var);
}
@var_dump($data);




use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\PHPMailer;

require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
// require 'PHPMailer/src/POP3.php';
require 'PHPMailer/src/OAuth.php';


$mail = new PHPMailer();

// $mail->IsSMTP();
 
$mail->SMTPDebug = 2;
$mail->Host = 'mail.smtp2go.com';
// $mail->Host = 'smtp-mail.outlook.com';
$mail->Port = 80;
// $mail->Port = 587;
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = True;
 
$mail->CharSet = 'UTF-8';  
$mail->SMTPKeepAlive = true;

// var_dump($mail);

// $mail = new PHPMailer(true);
    $mail->isSMTP();                                      // Set mailer to use SMTP
    // $mail->SMTPDebug = 2;                                 // Enable verbose debug output
    // $mail->Host = 'smtp-mail.outlook.com';  // Specify main and backup SMTP servers
    // $mail->SMTPAuth = true;                               // Enable SMTP authentication
    $mail->Username = 'scott.reph@gmail.com';                 // SMTP username
    $mail->Password = '9o2RNWcgZGbe';                           // SMTP password
    // $mail->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
    // $mail->Port = 587;                                    // TCP port to connect to
// $mail->Mailer = 'smtp';
// $mail->IsSMTP();
// // $mail->Mailer = 'smtp';
// $mail->CharSet = 'UTF-8';

// // $mail->Host       = "mail.theperformersnetwork.com"; // SMTP server example
// // $mail->SMTPDebug  = 0;                     // enables SMTP debug information (for testing)
// // $mail->SMTPAuth   = true;                  // enable SMTP authentication
// // $mail->Port       = 25;                    // set the SMTP port for the GMAIL server
// // $mail->Username   = "web@theperformersnetwork.com"; // SMTP account username example
// // $mail->Password   = "215648921893518sR!";        // SMTP account password example


	// From email address and name
	$mail->From = 'scott@rightthumb.com';
	$mail->FromName = "Test - Me";

	//To address and name
	$mail->addAddress("scott.reph@gmail.com", "Recepient Name");
	// $mail->addAddress("recepient1@example.com"); //Recipient name is optional

	//Address to which recipient will reply
	$mail->addReplyTo("scott@rightthumb.com", "Reply");

	//CC and BCC
	// $mail->addCC("cc@example.com");
	// $mail->addBCC("bcc@example.com");

	//Send HTML or Plain Text email
	$mail->isHTML(true);

	$mail->Subject = "Test 000";
	$mail->Body = "<i>Mail body in HTML</i>";
	$mail->AltBody = "This is the plain text version of the email content";
$mail->msgHTML('<b>test</b>');
	if(!$mail->send()) 
	{
	    echo "Mailer Error: " . $mail->ErrorInfo;
	} 
	else 
	{
	    echo "Message has been sent successfully";
	}




// $data = '1-5';
// echo whatIsIt($data);





// set_include_path('/home/content/26/11719426/html/PEAR/');
// require_once '/home/content/26/11719426/html/PEAR/Mail.php';

// // require_once '/home/content/26/11719426/html/PEAR/Net/SMTP.php';
// // require_once '/home/content/26/11719426/html/PEAR/Mail/smtp.php';




//     $from = "scott.reph@gmail.com";
//     $to = "scott.reph@gmail.com";
//     $subject = " ** Test Success ** ";
//     $body = "Hi,\n\It works?";

//     $host = "ssl://smtp.gmail.com";
//     $port = "465";
//     // $host = "ssl://smtp.mail.yahoo.com";
//     // $host = "smtp.mail.yahoo.com";
//     // $host = "tls://smtp.mail.yahoo.com";
//     // $port = "465";


//     // $host = "tls://smtp-mail.outlook.com";
//     // $port = "587";
//     // $port = 587;




//     // $username = "scottreph@yahoo.com";
//     // $password = "9111436Microsoft.com!";

//     $username = "scott.reph@gmail.com";
//     $password = "c1nn@m0n1207";











//             // $host = "smtp.gmail.com";
//             // $port = "587";
//             // $to = "recipient@edmdesigner.com";

//             $email_from = $from;
//             $email_subject = $subject;
//             $email_body = $body;
//             $email_address = $from;
//             $content = "text/html; charset=utf-8";
//             $mime = "1.0";

//             $headers = array ('From' => 'scott.reph@gmail.com',
//                             'To' => 'scott.reph@gmail.com',
//                             'Subject' => '** It Works **',
//                             'Reply-To' => 'scott.reph@gmail.com',
//                             'MIME-Version' => '1.0',
//                             'Content-type' => 'text/html; charset=utf-8');

//             $params = array  ('host' => 'ssl://smtp.gmail.com',
//                             'port' => '465',
//                             'auth' => true,
//                             'debug' => true,
//                             'pipelining' => true,
//                             'socket_options' => array('ssl' => array('verify_peer_name' => false)),
//                             'username' => 'scott.reph@gmail.com',
//                             'password' => 'c1nn@m0n1207');

//             $smtp = Mail::factory ('smtp', $params);
//             $mail = $smtp->send($to, $headers, $email_body);

//             if (PEAR::isError($mail)) {
//             echo("<p>" . $mail->getMessage() . "</p>");
//             } else {
//             echo("<p>Message sent successfully!</p>");
//             }




















    // $username = "scottreph@outlook.com";
    // $password = "DrMarvin7&1";

    // $username = "<scott.reph@gmail.com>";
    // $username = "scott.reph@gmail.com";
    // $password = "c1nn@m0n1207";

    // $headers = array ('From' => $from,
    //   'To' => $to,
    //   'Subject' => $subject);
    // $smtp = Mail::factory('smtp',
    //   array ('host' => $host,
    //     'port' => $port,
    //     'auth' => true,
    //     'username' => $username,
    //     'password' => $password));

    // $mail = $smtp->send($to, $headers, $body);

    // if (PEAR::isError($mail)) {
    //   echo("<p>" . $mail->getMessage() . "</p>");
    // } else {
    //   echo("<p>Message successfully sent!</p>");
    // }



// $headers = array (
//          'From' => $from,
//          'To' => $to,
//          'Subject' => $subject);
 
// $smtp = Mail::factory('smtp',
//       array (
//             'host' => $host,
//             'port' => $port,
//             'auth' => true,
//             'username' => $username,
//             'password' => $password));
 
// $mail = $smtp->send($to, $headers, $body);
 
// if (PEAR::isError($mail)) die($mail->getMessage());


















    // require "Mail.php";
    // $to      = "mysender@here.com";
    // $from    = "myemail@here.com"; // the email address
    // $subject = "hiii";
    // $body    = "\n\nEmail contents here";

    // $host    = "smtp.gmail.com";
    // $port    =  "587";
    // $user    = "my username";
    // $pass    = "mypassword";
    // $headers = array("From"=> $from, "To"=>$to, "Subject"=>$subject);
    // $smtp    = @Mail::factory("smtp", array("host"=>$host, "port"=>$port, "auth"=> true, "username"=>$user, "password"=>$pass));
    // $mail    = @$smtp->send($to, $headers, $body);

    // if (PEAR::isError($mail)){
    //     echo "error: {$mail->getMessage()}";
    // } else {
    //     echo "Message sent";
    // }




?>