By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,222 Members | 2,374 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,222 IT Pros & Developers. It's quick & easy.

one problem about

P: n/a
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:
s = smtplib.SMTP()
s.connect('') connect: ('', 25)
connect: ('', 25)
reply: '220 Welcome to coremail System(With Anti-Spam) 2.1 for
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)') s.login('Frank','*****')

send: 'ehlo\r\n'
reply: '\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:
SIZE 30720000
AuthMethod: None
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "D:\tools\Python22\lib\", 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.


Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.