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 serve R <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.co M', '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 = 'Demo '. $ userinfo-> firstname. ''. $ userinfo-> familyname. ': <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/> password is: <font color = "red"> '. trim (Context: $ request-> getstring ('passwd ')). '</font> <br/> <Br/> Support Team <br/> www.underabus.com <br/> '; </P> <p> $ mail-> addaddress ($ userinfo-> email, $ userinfo-> firstname. "". $ userinfo-> familyname); </P> <p> If (! $ Mail-> send () {</P> <p >}else {</P> <p >}< br/>