phpmailer+163邮箱发送邮件

2025-04-22 04:23:27

1、1.需要注册一个163的邮箱。

phpmailer+163邮箱发送邮件

2、2.登陆163邮箱,

phpmailer+163邮箱发送邮件

3、3.点击设置中的SMTP进行设置,默认是不开启的。

phpmailer+163邮箱发送邮件

4、开启的时候,需要设置授权码,这个很重要!一定要记住授权码,因为下面的代码里面需要用到该密码,而不是163邮耩馔缅凌箱的登陆密码。一开始我也用的登陆密码,报错信息:The following From address failed:... SMTP server error: authentication is required,smtp...

5、开启成功后,保存。

phpmailer+163邮箱发送邮件

6、php代码如下。因为thinkcmf中自带了class.phpmailer.php和class.smtp.php的,如果没有现成的,可以去网上下载。

phpmailer+163邮箱发送邮件

7、发送成功。

8、收件箱查看邮件信息如下。

phpmailer+163邮箱发送邮件
phpmailer+163邮箱发送邮件
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
相关推荐
  • 阅读量:32
  • 阅读量:93
  • 阅读量:58
  • 阅读量:27
  • 阅读量:95
  • 猜你喜欢