提示信息

PHPMailer 关闭debug, 输出。 如何设置

大壮 已关注

在PHPMailer中,可以通过设置SMTPDebug属性为0来关闭debug输出。

具体代码如下:

  1. $mail = new PHPMailer(true);
  2. $mail->SMTPDebug = 0;

SMTPDebug属性的值决定了PHPMailer的debug输出级别:

  • 0: No output
  • 1: Commands
  • 2: Data and commands
  • 3: As 2 plus connection status
  • 4: Low-level data output

所以,设置$mail->SMTPDebug = 0;将关闭debug输出。

    遇到难题? "AI大模型GPT4.0、GPT" 是你的私人解答专家! 点击按钮去提问......
大壮 关注 已关注

最近一次登录:2023-12-06 13:28:41   

暂时还没有签名,请关注我或评论我的文章
×
免费图表工具,画流程图、架构图