Yet more SMTP

Brad Tilley rtilley at
Tue Oct 19 03:38:36 CEST 2004

LutherRevisited wrote:
> 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('', 587)
>         s.set_debuglevel(1)
>         s.ehlo()
>         s.docmd('AUTH', 'PLAIN')
>         s.docmd('LutherRevisited')
>         s.docmd('myPassword')
>         s.sendmail('lutherrevisited at', [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('')
>         s.set_debuglevel(1)
>         s.ehlo()
>         s.sendmail('bossierbossman at', [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?

You may find this URL helpful:

More information about the Python-list mailing list