Problem with SMTP authentication in PHP using PHPMailer, with Pear Mail works

后端 未结 7 949
[愿得一人]
[愿得一人] 2021-02-01 06:58

I´m having trouble sending a e-mail with the PHPMailer class, but it works with PEAR Mail::factory.

I guess the problem is with the SMTP authentication, but I couldn´t f

7条回答
  •  闹比i
    闹比i (楼主)
    2021-02-01 07:22

    Exim 4 requires that AUTH command only be sent after the client issued EHLO - attempts to authenticate without EHLO would be rejected. Some mailservers require that EHLO be issued twice. PHPMailer apparently fails to do so. If PHPMailer does not allow you to force EHLO initiation, you really should switch to SwiftMailer 4.

提交回复
热议问题