SMTP server response: 530 5.7.0 Must issue a STARTTLS command first

后端 未结 9 702
生来不讨喜
生来不讨喜 2020-11-28 13:25

SMTP server response: 530 5.7.0 Must issue a STARTTLS command first

I get this error message when i use mail() function in php script file...

I m using gmail

9条回答
  •  再見小時候
    2020-11-28 14:19

    In my case, Swift Mailer couldn't help either. I found a solution here: http://forum.powweb.com/showthread.php?t=73406 - so after EHLO command one needs to send STARTTLS command, enabling cryptography with stream_socket_enable_crypto( $connection, true, STREAM_CRYPTO_METHOD_TLS_CLIENT ); and again EHLO command. Only this allowed me to send emails with my "stubborn" SMTP server.

提交回复
热议问题