<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>PHPMailer - mail() test</title>
</head>
<body>
<?php 
require_once("Mail.php");
$mail_to = 'huub@bbi.co.bw';
$subject = 'test message';
$message = 'testing';
	
    $host = "ssl://smtp.gmail.com";  
	$username = "notification.cust.software@gmail.com";  //<> give errors
    $password = "phakalane2001";   

    
    //$headers = array ('From' => $from,
//        'To' => $mail_to,
//        'Subject' => $subject
//    );

$headers = array ('MIME-Version' => '1.0',
        'Content-Type' => "text/html; charset=ISO-8859-1",
        'From' => $from,
        'To' => $mail_to,
        'Subject' => $subject
     );
	
	
    $smtp = Mail::factory('smtp',
        array ('host' => $host,
            'auth' => true,
            'port' => '465',
			'username' => $username,
            'password' => $password
	   )
    );
	

    $mail = $smtp->send($mail_to, $headers, $message);
    if (PEAR::isError($mail)) {
        echo($mail->getMessage());
    }
    else {
        echo("Message successfully sent!");
    }
		
?>

</body>
</html>
