There are a lot of friends for the PHP mail function and distress, in fact, the key is its SMTP service problem. Most of the commonly used 163, SINA, etc. do not support the anonymous sending of mail, that is, even if you set php.ini in the SMTP smtp.163.net/smtp.sina.com.cn will also prompt errors. What do we do? Today got a call IMail mail service software, tried, incredibly successful. The method is described below:
1, install IMAIL. According to the default installation, if your machine name is server, then its SMTP service name is also server.
2. Take a look at "Control Panel"-"service", IMAIL SMTP server is up.
3, modify the php.ini. The smtp= server
4, test it.
echo "";
$subject = "Test send e-mail with IMail";
$message = "HTML-formatted mail, do you want to know the original program? ";
$extra = "From:yukuang@163.netcontent-type:text/html;charset=gb2313content-transfer-encoding:8bit";
echo "Sending mail ...";
Mail ("Yourmail", $subject, $message, $extra);
echo "";
?>
http://www.bkjia.com/PHPjc/629288.html www.bkjia.com true http://www.bkjia.com/PHPjc/629288.html techarticle There are a lot of friends for the PHP mail function and distress, in fact, the key is its SMTP service problem. Now commonly used 163, Sina and so on most do not support anonymous send mail, that is, even if you put P ...