Home  >  Article  >  Backend Development  >  Mail sending program based on mail service software (IMAIL) under NT-(local version)_PHP tutorial

Mail sending program based on mail service software (IMAIL) under NT-(local version)_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:12:481027browse

Many friends are worried about PHP's MAIL function. In fact, the key is its SMTP service problem. Most of the currently used 163, sina, etc. do not support anonymous sending of emails, which means that even if you set the smtp in php.ini to smtp.163.net/smtp.sina.com.cn, an error will be prompted. What to do? Today I got an email service software called IMAIL. I gave it a try and it actually worked. The method is now explained as follows:
1. Install IMAIL. According to the default installation, generally if the name of your machine is server, then its SMTP service name is also server.
2. Check "Control Panel" - "Services" to see if the IMAIL SMTP SERVER is up.
3. Modify php.ini. Set smtp= server
4. Test it.
echo "";
$subject = "Test sending email using IMAIL";
$message = "HTML format email, want to know the original program? ";
$extra="From:yukuang@163.net Content-Type:text/html;charset=gb2313 Content-Transfer-Encoding:8bit";
echo "Sending mail...";
mail ("yourmail", $subject, $message, $extra);
echo " ";
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629288.htmlTechArticleMany friends are troubled by PHP’s MAIL function. In fact, the key is its SMTP service problem. Most of the commonly used 163, sina, etc. do not support anonymous sending of emails, that is to say, even if you put p...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn