As a simple test case in python, smtp module fails to be allowed normal communication with the smpt.servers for zoho emails.
Below is detailed (with security details obscured) two attempts to send a simple email on 465 /SSL and 587/TLS via smtp.zoho.com which on test have repeatedly failed, and equivalent test with gmail addresss on 587/TLS which does the same function from python without any problems. Please can you tell me if there is a solution, as all previous posts and comments do not suggest any workable solution.
ATTEMPT NO 1 - SMTP.ZOHO.COM 587 TLS - FAIL
>>> import smtplib
>>> server = smtplib.SMTP('smtp.zoho.com', 587)
>>> server.starttls()
(220, 'Ready to start TLS.')
>>>
(235, 'Authentication Successful')
>>> msg = "YOUR MESSAGE!"
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/python2.7/smtplib.py", line 743, in sendmail
(code, resp) = self.data(msg)
File "/usr/lib/python2.7/smtplib.py", line 511, in data
(code, msg) = self.getreply()
File "/usr/lib/python2.7/smtplib.py", line 368, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
SMTPServerDisconnected: Connection unexpectedly closed
ATTEMPT NO 2 - SMTP.ZOHO.COM 465 SSL - FAIL
>>> import smtplib
>>> server = smtplib.SMTP_SSL('smtp.zoho.com', 465)
(235, 'Authentication Successful')
>>> msg = "YOUR MESSAGE!"
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/python2.7/smtplib.py", line 743, in sendmail
(code, resp) = self.data(msg)
File "/usr/lib/python2.7/smtplib.py", line 511, in data
(code, msg) = self.getreply()
File "/usr/lib/python2.7/smtplib.py", line 368, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
SMTPServerDisconnected: Connection unexpectedly closed
ATTEMPT NO 3 - SMTP.GMAIL.COM 587 TLS - SUCCESS
>>> import smtplib
>>> server = smtplib.SMTP('smtp.gmail.com', 587)
>>> server.starttls()
(220, '2.0.0 Ready to start TLS')
(235, '2.7.0 Accepted')
>>> msg = "YOUR MESSAGE!"
{}
>>> server.quit()
(221, '2.0.0 closing connection s187sm811255lfd.3 - gsmtp')