one problem about smtplib.py

F

Frank Zheng

I wrote some code to test "smtplib", but i met a problem when i call the
"login(user,pass)" of the "SMTP" object.
here are the codes:
connect: ('smtp.263.net', 25)
connect: ('smtp.263.net', 25)
reply: '220 Welcome to coremail System(With Anti-Spam) 2.1 for
263(040326)\r\n'
reply: retcode (220); Msg: Welcome to coremail System(With Anti-Spam) 2.1
for 263(040326)
connect: Welcome to coremail System(With Anti-Spam) 2.1 for 263(040326)
(220, 'Welcome to coremail System(With Anti-Spam) 2.1 for 263(040326)')send: 'ehlo pc11.FutureDialChina.FutureDialChina.com\r\n'
reply: '250-smtp.263.net\r\n'
reply: '250-PIPELINING\r\n'
reply: '250-SIZE 30720000\r\n'
reply: '250-ETRN\r\n'
reply: '250-AUTH LOGIN\r\n' # should be "250-AUTH PLAIN"
reply: '250-AUTH=LOGIN\r\n'
reply: '250-XVERP\r\n'
reply: '250 8BITMIME\r\n'
reply: retcode (250); Msg: smtp.263.net
PIPELINING
SIZE 30720000
ETRN
AUTH LOGIN
AUTH=LOGIN
XVERP
8BITMIME
AuthMethod: None
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "D:\tools\Python22\lib\smtplib.py", line 540, in login
raise SMTPException("No suitable authentication method found.")
SMTPException: No suitable authentication method found.

I read the "login" of "smtplib" , I found it has two authentication method
one is "PLAIN", the other is "CRAM-MD5", but the server's reply here didn't
chose one of these two choices. I tested several mail-servers in China, they
all just support "AUTH LOGIN". I found the Outlook use "AUTH LOGIN" and make
it as standard.

So I think smtplib maybe need do some changes, or someone has already did
this work.

Thanks
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top