Mailing List Archive

smtplib hang on send "data <crlf>" to MS SMTP server
code which works fine with netscape SMTP mail server, fails (hangs) when
attempting to send mail to a MicroSoft SMTP server. In the module following
the call to putcmd("data") the data() calls getreply and never returns. Does
anyone have an idea what is happening here? The server seems to work with
other clients. thanks max

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
smtplib hang on send "data <crlf>" to MS SMTP server [ In reply to ]
[max@rightworks.com]
> code which works fine with netscape SMTP mail server, fails (hangs) when
> attempting to send mail to a MicroSoft SMTP server. In the
> module following the call to putcmd("data") the data() calls getreply
> and never returns. Does anyone have an idea what is happening here? The
> server seems to work with other clients. thanks max

Try posting a complete executable failing example? If you're not going to
track it down, you need to pass on enough info so someone else can <0.9
wink>. MS SMTP servers in my experience follow the most restrictive
possible reading of the protocol specs, and will just sit there if you e.g.
so much as include an extraneous blank.

Also be clear about which version of Python you're using, and which OS.
smtplib.py has changed a *lot* since 1.5.1 (have you tried 1.5.2?).

upgrading-is-a-cure-for-many-ills-ly y'rs - tim
smtplib hang on send "data <crlf>" to MS SMTP server [ In reply to ]
>>>>> "TP" == Tim Peters <tim_one@email.msn.com> writes:

TP> Also be clear about which version of Python you're using, and
TP> which OS. smtplib.py has changed a *lot* since 1.5.1 (have
TP> you tried 1.5.2?).

There's even a patch that was made to smtplib.py /after/ Python 1.5.2
final was released. You can grab the latest version from the CVS tree

http://www.python.org/download/cvs.html

-Barry