This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author boom0192
Recipients boom0192
Date 2021-02-04.13:23:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612445008.73.0.955251739992.issue43125@roundup.psfhosted.org>
In-reply-to
Content
The space is string, and either mechanism and/or response are bytes.
smtplib.py:634
response = encode_base64(initial_response.encode('ascii'), eol='')
(code, resp) = self.docmd("AUTH", mechanism + " " + response)


import smtplib, ssl
port = 587  
smtp_server = "---------------"
smtpserver = smtplib.SMTP(smtp_server, port)
smtpserver.set_debuglevel(2)
smtpserver.ehlo()
smtpserver.starttls()
smtpserver.ehlo
smtpserver.login("", "")

-----------------------------------------------------
12:40:37.614737 send: 'ehlo [10.60.69.196]\r\n'
12:40:37.665528 reply: b'250-MWHPR20CA0007.outlook.office365.com Hello [65.54.12.68]\r\n'
12:40:37.665666 reply: b'250-SIZE 157286400\r\n'
12:40:37.665761 reply: b'250-PIPELINING\r\n'
12:40:37.665788 reply: b'250-DSN\r\n'
12:40:37.665806 reply: b'250-ENHANCEDSTATUSCODES\r\n'
12:40:37.665825 reply: b'250-STARTTLS\r\n'
12:40:37.665842 reply: b'250-8BITMIME\r\n'
12:40:37.665859 reply: b'250-BINARYMIME\r\n'
12:40:37.665876 reply: b'250-CHUNKING\r\n'
12:40:37.665893 reply: b'250 SMTPUTF8\r\n'
12:40:37.665919 reply: retcode (250); Msg: b'MWHPR20CA0007.outlook.office365.com Hello [65.54.12.68]\nSIZE 157286400\nPIPELINING\nDSN\nENHANCEDSTATUSCODES\nSTARTTLS\n8BITMIME\nBINARYMIME\nCHUNKING\nSMTPUTF8'
12:40:37.666440 send: 'STARTTLS\r\n'
12:40:37.716214 reply: b'220 2.0.0 SMTP server ready\r\n'
12:40:37.716265 reply: retcode (220); Msg: b'2.0.0 SMTP server ready'
12:40:37.878320 send: 'ehlo [10.60.69.196]\r\n'
12:40:37.928198 reply: b'250-MWHPR20CA0007.outlook.office365.com Hello [65.54.12.68]\r\n'
12:40:37.928259 reply: b'250-SIZE 157286400\r\n'
12:40:37.928285 reply: b'250-PIPELINING\r\n'
12:40:37.928304 reply: b'250-DSN\r\n'
12:40:37.928323 reply: b'250-ENHANCEDSTATUSCODES\r\n'
12:40:37.928437 reply: b'250-AUTH LOGIN XOAUTH2\r\n'
12:40:37.928461 reply: b'250-8BITMIME\r\n'
12:40:37.928494 reply: b'250-BINARYMIME\r\n'
12:40:37.928511 reply: b'250-CHUNKING\r\n'
12:40:37.928528 reply: b'250 SMTPUTF8\r\n'
12:40:37.928552 reply: retcode (250); Msg: b'MWHPR20CA0007.outlook.office365.com Hello [65.54.12.68]\nSIZE 157286400\nPIPELINING\nDSN\nENHANCEDSTATUSCODES\nAUTH LOGIN XOAUTH2\n8BITMIME\nBINARYMIME\nCHUNKING\nSMTPUTF8'
Traceback (most recent call last):
  File "mail9.py", line 18, in <module>
    smtpserver.login("", "")
  File "/aae/msio_install_release1.9/scoring_engine.20201201.3.8.3/lib/python3.8/smtplib.py", line 723, in login
    (code, resp) = self.auth(
  File "/aae/msio_install_release1.9/scoring_engine.20201201.3.8.3/lib/python3.8/smtplib.py", line 635, in auth
    (code, resp) = self.docmd("AUTH", mechanism + " " + response)
TypeError: can only concatenate str (not "bytes") to str
History
Date User Action Args
2021-02-04 13:23:28boom0192setrecipients: + boom0192
2021-02-04 13:23:28boom0192setmessageid: <1612445008.73.0.955251739992.issue43125@roundup.psfhosted.org>
2021-02-04 13:23:28boom0192linkissue43125 messages
2021-02-04 13:23:28boom0192create