gh_pythonlist at gmx.de
Sun Oct 21 04:11:06 CEST 2001
On Sun, Oct 21, 2001 at 12:32:45AM +0000, Sheila King wrote:
> On Sun, 21 Oct 2001, Gerhard Häring wrote:
> :On Sat, Oct 20, 2001 at 11:41:34PM +0200, A wrote:
> :> Hi,
> :> I want to use smtplib module for sending emails. Is there any way how
> :> I can test a return code, generated by this module, to see if an email
> :> was accepting for delivery, for example?
> :No, there is no way to do this. But this is a "feature" of SMTP, not of
> :Python's smtplib.
> I am very surprised at this response.
> This same inquiry was also posted to the Python Tutor mailing list, and
> I answered in the affirmative. Here is the message I posted (with a
> minor correction: [... about the sendmail method of the smtplib.SMTP class]
you're of course right. My thinking was too complicated, again. But
you'll only recognize if the local delivery to the mail server failed,
not when relayed mail's delivery fails. I did never find the local
failures particularly interesting, because I usually know which users
exist on my SMTP server in advance.
I was thinking about the general problem of finding out if an email
address exists and if mails get delivered. This is of course much more
complex, and AFAIK not solvable in the general case.
mail: gerhard <at> bigfoot <dot> de registered Linux user #64239
web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
More information about the Python-list