talking ssl-enabled smtp with php

This is just a repost so I remember. When talking SMTP via a PHP script with a webserver, remember to initiate with “EHLO” instead of the usual “HELO”.

HELO does not allow for STARTTLS.

Details: fwrite(): SSL operation failed with code 1. OpenSSL Error messages:error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown