How can I determine an HTTPMessage ?

David Murmann david.murmann at rwth-aachen.de
Wed Jan 11 16:58:03 EST 2006


Steve Holden schrieb:
> Kevin wrote:
>> Can you tell me what to look for in an HTTPMessage that is an error?  I
>> have looked at the header objects and I cannot determine an error
>> message.
>>
> I was thinking of a number between one and a thousand, and I forgot it. 
> Could someone please remind me what it was?

import smtplib

server = smtplib.SMTP('your.favorite.smtp.relay')

msg = """From: Spambot
To: python-list at python.org

Hi!
is it %d?
"""

for i in range(1, 1001):
    server.sendmail('Spambot', 'python-list at python.org', msg % i)

server.quit()

# could it be considered dangerous to post such code? ;)

--
David.



More information about the Python-list mailing list