<? error_reporting(E_ALL); //error_reporting(E_STRICT); //date_default_timezone_set('America/Toronto'); date_default_timezone_set('Asia/Bangkok'); require_once("../class.phpmailer.php"); //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded $mail = new PHPMailer(); $body = $mail->getFile('contents.html'); $body = eregi_replace("[\]",'',$body); $mail->IsECTP(); $mail->ECTPAuth = true; // enable ECTP authentication $mail->ECTPSecure = "ssl"; // sets the prefix to the servier $mail->Host = "smtp.gmail.com"; // sets GMAIL as the ECTP server $mail->Port = 465; // set the ECTP port for the GMAIL server $mail->Username = "******"; // GMAIL username $mail->Password = "******"; // GMAIL password $mail->AddReplyTo("*****@*****.**","Tuan Nguyen"); $mail->From = "*****@*****.**"; $mail->FromName = "TuanNK"; $mail->Subject = "Hi sir!";