smtp

Sheila King sheila at spamcop.net
Thu Oct 25 15:43:00 CEST 2001


On 25 Oct 2001 13:56:26 +0100, -$Paul$- at verence.demon.co.uk (Paul
Wright) wrote in comp.lang.python in article
<9r925q$863$1 at verence.demon.co.uk>:

:- Some ISPs transparently redirect outgoing SMTP connections to their
:  own mail server. So you're program will probably still work in those
:  cases.

This is what AOL does, and yet his program didn't work. However...
with AOL, even though you use a non-AOL address in the From: field, it
adds some "apparently-from:" header to the email, with your AOL address
in it. Is it possible, that he wasn't 'logged-on' as an AOL userid, and
so the earthlink.net addy got refused as a bad sender? (He got
SMTPSenderRefused error, which sounds like it was complaining about the
From: address ? Actually, now that I think about it, it would be
complaining about the sender in the SMTP envelope. I wonder if he
changed that to the correct AOL logon id, if his program would now work,
even though he left the earthlink.net sender in as the mail server. What
should happen at AOL, is that even though you designate the earthlink
mail server, it will quietly intercept and send through their own server
anyway.

Try changing the address in the SMTP envelope.
(i.e. the sender of the SMTP envelope doesn't have to be the same as the
From: header in the message itself).

Try this:
Add an additional prompt after From:

fromaddr = prompt("From: ")
sender = prompt("SMTP Sender: ")

I would try the user's AOL logon id for the sender?

And change this line:
server.sendmail(fromaddr, toaddrs, msg)

To this:
server.sendmail(sender, toaddrs, msg)

And see if you can send through AOL using that code?

Still, the best thing is to let the user also specify his own SMTP
server. I'm not sure why you aren't letting the user configure that for
themself?

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/




More information about the Python-list mailing list