smtplib.SMTPConnectError: (-1, b 'Служба Microsoft Exchange IMAP4 готова.')
msg['Subject'] = str("Error in file".encode(), 'utf-8')
msg['From'] = "exmpleSender@gmail.com"
msg['To'] = "exmple@gmail.com"
s = SMTP_SSL('mail.example.kz', 993, timeout=10)
s.set_debuglevel(1)
try:
s.login('example', '123456')
s.sendmail(msg["From"], msg["To"].split(","), msg.as_string())
finally:
s.quit()