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

后端 未结 9 690
生来不讨喜
生来不讨喜 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:17

    I know that PHPMailer library can handle that kind of SMTP transactions.

    Also, a fake sendmail with sendmail-SSL library should do the job.

    0 讨论(0)
  • 2020-11-28 14:17

    For Windows, I was able to get it working by enabling TLS for secure communication on the SMTP Virtual server. TLS will not be available on the SMTP virtual server without a certificate. This link will give the steps needed.

    https://support.microsoft.com/en-ie/help/4014125/how-to-configure-iis-smtp-for-outgoing-tls-authentication

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题