STMP:25 is not a TLS-by-default service, although it can accept TLS negotiation post-fact. Since heartbeat is expecting to get a TLS negotiation handshake, it shows that error when the remote party does not continue with the flow.
You'll need to figure out of your service provides a TLS-secured version on a different port.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.