Home >Backend Development >PHP Tutorial >PHP怎么发送163邮件

PHP怎么发送163邮件

PHPz
PHPzOriginal
2016-06-01 14:25:282254browse

PHP怎么发送163邮件

PHP怎么发送163邮件?

步骤:

1、注册拿到授权码:

a0cca7037ad9e4ca69c2ee2fc9b9f5b.png

2、填写授权码而非邮箱密码到如下代码中:

<?php
require &#39;MaiSmtp.class.php&#39;;
$Mail = new MaiSmtp(&#39;smtp.163.com&#39;, &#39;jamaljo@163.com&#39;, &#39;m****2&#39;);
$Mail->send(&#39;测试邮件&#39;, &#39;<h2>内容:
</h2><p>MaiSmtp.class.php powered by m35</p>&#39;, &#39;wucifan@daxiangtravel.com&#39;);

注意:

填写授权码而非密码来获得权限通过代码自动发送邮件;

示例demo:

git@git.oschina.net:JamalJo/MaiSmtp.class.php.git

更多相关知识,请访问PHP中文网!

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