protected function SendMail($userinfo) {</p><p> import("YzLib.Util.PHPMailer");<br /> import("YzLib.Util.SMTP");</p><p> $mail = new PHPMailer();<br /> $mail->IsSMTP(); // telling the class to use SMTP<br /> // $mail->SMTPDebug = 1; // enables SMTP debug information (for testing)<br /> // 1 = errors and messages<br /> // 2 = messages only<br /> $mail->Host = "smtpout.secureserver.net"; // SMTP server<br /> $mail->SMTPAuth = true; // enable SMTP authentication<br /> $mail->Port = 25; // set the SMTP port for the GMAIL server<br /> $mail->FromName = "www.underabus.com";<br /> $mail->Username = "jian.zhao@dilitech.com"; // SMTP account username<br /> $mail->Password = "holiday"; // SMTP account password<br /> $mail->From = "jian.zhao@dilitech.com";<br /> $mail->AddReplyTo('jian.zhao@dilitech.com', 'www.underabus.com');</p><p> $mail->Subject = "Your account details with www.underabus.com";</p><p> $mail->AltBody = "Dear ".$userinfo->Firstname." ".$userinfo->FamilyName.",Thanks for registering with www.underabus.com. your username is: ".$userinfo->Email."password is:".trim(Context::$request->getString('Passwd'))." Support Team www.underabus.com"; // optional, comment out and test</p><p> //$mail->MsgHTML($body);</p><p> $mail->Body = 'Dear '.$userinfo->Firstname.' '.$userinfo->FamilyName.' :<br /><br /><br /> Thanks for registering with <a href="www.underabus.com" mce_href="www.underabus.com">www.underabus.com</a><br /><br /><br /> your username is: '.$userinfo->Email.'<br /><br /><br /> password is: <font color="red">'.trim(Context::$request->getString('Passwd')).'</font><br /><br /><br /> Support Team<br /><br /><br /> www.underabus.com<br /><br /><br /> ';</p><p> $mail->AddAddress($userinfo->Email, $userinfo->Firstname." ".$userinfo->FamilyName);</p><p> if(!$mail->Send()) {</p><p> } else {</p><p> }<br /> }<br />