AnsweredAssumed Answered

Python email question

Question asked by mpretorius on Aug 5, 2019
Latest reply on Aug 5, 2019 by rdhulipudiesriaustralia-com-au-esridist

I am trying to send a email using the smtplib package and am getting the following error:




  1. import smtplib
  2. server_ssl = smtplib.SMTP_SSL('', xxx)
  3. server_ssl.ehlo() # optional, called by login()
  4. server_ssl.login('xxxx@xxx.local', 'xx')
  5. # ssl server doesn't support or need tls, so don't call server_ssl.starttls()
  6. server_ssl.sendmail("", "", "hello")
  7. #server_ssl.quit()
  8. server_ssl.close()
  9. print 'successfully sent the mail'




Traceback (most recent call last):
File "", line 3, in <module>
server_ssl = smtplib.SMTP_SSL('', xxx)
File "C:\Python27\ArcGIS10.7\lib\", line 802, in __init__
SMTP.__init__(self, host, port, local_hostname, timeout)
File "C:\Python27\ArcGIS10.7\lib\", line 259, in __init__
raise SMTPConnectError(code, msg)
smtplib.SMTPConnectError: (-1, 'The Microsoft Exchange IMAP4 service is ready. [QgBOADYAUABSADEAMQBDAEEAMAAw]')


Any help is appreciated. Thank you! #