We setup a new email account via CPanel, and we tested that we can log into the webmail to send and receive emails of that account. We use this email account to send mails to our visitors to comlete the registration & activate their membership. However, on our website, we always see "mail has been successfully sent" but in fact, no one can receive that mails. Since the mail system is good, there seems to me some mistakes in relation to our scripts. And, our emails need to be athorizaed, here is the scripts, can any body advise that how to correct? Thanks in advance.

$smtpserver = "mail.xxx.com"; 
$port = 25 ; 
$smtpuser = "test0830@xxx.com";					
$smtppwd = "111111"; 
$mailtype = "HTML";					
$sender = "test0830@xxx.com";
$smtp  = new smtp($smtpserver,$port,true,$smtpuser,$smtppwd,$sender); 
$smtp->debug = true;					
$to = $UserName; 
$subject = "Active Your Account-xxx";
$body = "<html>
8 Years
Discussion Span
Last Post by langsor


$smtp = new smtp is not a core php functionality, so I have no idea what it's doing that could influence if your script is correct or not.

With html email you need to make sure to set the content type to text/html in the email header.

Good luck

Here's a little tutorial on the subject of PHP email -- http://www.sitepoint.com/article/advanced-email-php

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.