Home > Backend Development > PHP Tutorial > NT下基于邮件服务软件(IMAIL)的邮件发送程序--(本地版)_PHP

NT下基于邮件服务软件(IMAIL)的邮件发送程序--(本地版)_PHP

WBOY
Release: 2016-06-01 12:42:38
Original
1073 people have browsed it

IMail

有很多朋友为了PHP的MAIL函数而苦恼,其实关键就是它的SMTP服务的问题。现在常用的163、sina等大都不支持匿名发送邮件,就是说即使你把php.ini中的smtp设为smtp.163.net/smtp.sina.com.cn也会提示错误。怎么办呢?今日搞到了一个叫IMAIL的邮件服务软件,试了一试,居然成功了。现将方法说明如下:
1、安装IMAIL。按照默认的安装,一般如果你的机器的名称是server,那么它的smtp服务名称也是server.
2、看一下“控制面板”-“服务”,IMAIL SMTP SERVER是否起来了。
3、修改php.ini。将smtp=    server
4、测试一下吧。

echo "";
$subject = "测试用IMAIL发送电子邮件";
$message = "NT下基于邮件服务软件(IMAIL)的邮件发送程序--(本地版)_PHPHTML格式的邮件,想知道原程序吗?";
$extra="From:yukuang@163.net\nContent-Type:text/html;charset=gb2313\nContent-Transfer-Encoding:8bit";
echo "Sending mail...";
mail ("yourmail", $subject, $message, $extra);
echo "";
?>
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template