If your script is configured to use port 465, then the reason for the failure is that port 465 has been disabled due to abuse by an influx of accounts using proxies that use that port.
Once the infestation of proxies is under control, I expect them to enable the port again.
Sorry for the inconvenience.