Yet more SMTP

LutherRevisited lutherrevisited at aol.com
Mon Oct 18 20:03:08 EDT 2004


Ok with some tweaking I got it to where I could send through my local isp's
smtp server, but I am restricted to sending the message from my ISP's mail
account.  When I respond to Yahoo mail, I want to use my yahoo address.  I was
able to get into aol's smtp with:
s = smtplib.SMTP('smtp.aol.com', 587)
        s.set_debuglevel(1)
        s.ehlo()
        s.docmd('AUTH', 'PLAIN')
        s.docmd('LutherRevisited')
        s.docmd('myPassword')
        s.sendmail('lutherrevisited at aol.com', [to], msg)
        s.quit()
but I'm unable to send on that server with my yahoo address, when I try this on
yahoo's smtp server it does not require me to use AUTH, but AOL drops my
messages giving me some kind of 'bulk mail, yada yada' message.  I don't have
this problem with Outlook using Yahoo's smtp server, so I'm curious to know
what it is that Outlook is doing that I'm missing in my code?  With Yahoo I did
something like:
s = smtplib.SMTP('smtp.yahoo.com')
        s.set_debuglevel(1)
        s.ehlo()
        s.sendmail('bossierbossman at yahoo.com', [to], msg)
        s.quit()
but this is dropped for some odd reason.  Any thoughts?  Also I never got the
login method of smtp to work with AOL's smtp, so I had to run through that by
hand.  Can someone tell me if I'm missing something there also?



More information about the Python-list mailing list