1.使用邮箱发送信息,在window上可以使用composer 中的邮箱插件,但是在liunx上的一般出现

Class 'PHPMailer\PHPMailer\PHPMailer' not found

 

如果项目部署在window 系统你可以:

thinkphp5.0 使用邮箱,window 上可以,但liunx 系统不能发送邮箱

use PHPMailer\PHPMailer\PHPMailer;

thinkphp5.0 使用邮箱,window 上可以,但liunx 系统不能发送邮箱

这就可以了。

2.如果在liunx上不能这样写了,请看目录

thinkphp5.0 使用邮箱,window 上可以,但liunx 系统不能发送邮箱

不能使用use 命名空间了

在extend 的目录下

thinkphp5.0 使用邮箱,window 上可以,但liunx 系统不能发送邮箱

这样就可以了实现邮箱

相关文章:

  • 2021-12-08
  • 2021-12-26
  • 2022-12-23
  • 2021-05-14
  • 2021-12-26
  • 2021-12-07
  • 2021-12-22
猜你喜欢
  • 2021-07-13
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-07-20
  • 2021-10-02
相关资源
相似解决方案