PHPMailer:不发送,不接收错误

So I had read and do all the solutions given at PHPMAILER Not sending and not giving error , however my mail is still not sent out via my SMTP. I'm using hMailServer 5.4-B1950, sending mail from 'localhost' and here is my code :

require_once('class.phpmailer.php');
$mail = new PHPMailer();

if ($ways=="cashchequesc"){
$_SESSION['youdont'] = "0";

$mail->IsSMTP();                         
$mail->Host     = "localhost";           
//$mail->SMTPAuth   = true;                // out in-case of future use.
$mail->Port       = 25;                  
//$mail->Username   = "deli-pie@gmail.com";  // out cause localhost doesn't seems to need one
//$mail->Password   = "ilovepie1984";         
$mail->From     = ("pie-delivery@pd.com");
$mail->FromName = ("PD-licious Pie");
$mail->AddAddress("piepie314159@gmail.com","PieUser1");
$mail->Subject  = $myusername . "'s Purchases of ". $_SESSION['amount'] ." of XXXX.";
$mail->Body     = $myusername ." has purchased X number of item for total amount of S$"     . $_SESSION["payamount"] . " via CHEQUE/Cash on Collection.";
$mail->WordWrap = 70;
  • UPDATE 16/7/2014 1356H GMT+8 Okay guys. I got it to work locally using hMailServer's Protocol set up and linking it to a gmail account. Now if I want to to go on a remote SMTP server, what should I change?