New submission from Kei Funagayama:

Hi,

I've found that the quit() method of SMTP instance (of smtplib) doesn't
return it's result (such as '221 2.0.0 Bye') .
Other methods such as helo(), ehlo(), verify() etc.. returns it's result
correctly so I suppose it's a kind of bug.

I've made a small patch for this so please take a look at it (It looks
like someone just forgot to return the value of docmd()).

below is the code piece to represent the problem.

>>> import smtplib
>>> s = smtplib.SMTP('localhost')
>>> s.helo() #<---- returns result code
(250, 'localhost')
>>> s.vrfy('[EMAIL PROTECTED]') #<---- returns result code
(554, '5.7.1 <<[EMAIL PROTECTED]>>: Relay access denied')
>>> s.quit() #<----- doesn't return anything
>>>

Thanks,
Kei

----------
components: Library (Lib)
files: smtplib.py.patch
keywords: patch
messages: 63346
nosy: funagayama
severity: normal
status: open
title: quit() method of SMTP instance (of smtplib) doesn't return it's result
versions: Python 2.4, Python 2.5, Python 2.6
Added file: http://bugs.python.org/file9626/smtplib.py.patch

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2248>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to