0

It works well on another hosting but on that where I would like to set this finally it's not working. How can I check why PHPMailer not sending? My code:

I don't really have an idea how to solve this trouble.

I will try to use older wersion of php mailer but it still not working at all..

I got this message:

2022-11-25 10:18:16 CLIENT -> SERVER: EHLO olbud.com.pl

2022-11-25 10:18:16 CLIENT -> SERVER: STARTTLS SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

2022-11-25 10:18:16 CLIENT -> SERVER: QUIT

2022-11-25 10:18:16 SMTP connect() failed.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
  • _"My code:"_ - that's pretty minimal, surprised it does anything at all :-) _"How can I check why PHPMailer not sending?"_ - it has a debug mode, have you enabled that yet? – CBroe Nov 25 '22 at 09:28
  • Have you checked the documentation? https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting is very easy to locate – ADyson Nov 25 '22 at 09:28
  • `I will try to use older wersion of php mailer`...why would that help? Except in very rare (and usually temporary) cases, older versions tend to have _more_ bugs and problems than newer ones - that's one reason why people release new versions! Don't just install an older one as guesswork, instead do some proper investigation to work out what is going wrong, and only then install another version when you have some actual evidence that it might help. – ADyson Nov 25 '22 at 09:29
  • But it's far more likely that the problem is unrelated to the phpmailer version, and instead there is something wrong in your environment (especially since you mention that the same code works well on another server). PHPMailers debug mode will give you lots of information which is likely to help understand where it's getting stuck. – ADyson Nov 25 '22 at 09:30
  • [this](https://www.google.com/search?q=phpmailer+OpenSSL+Error+messages%3Aerror%3A1416F086%3ASSL+routines%3Atls_process_server_certificate%3Acertificate+verify+failed) may contain useful information. – ADyson Nov 25 '22 at 10:24
  • 1
    More to the point, there's [a whole section in the guide about this exact error](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#certificate-verification-failure). – Synchro Nov 25 '22 at 10:48

0 Answers0