Yet more SMTP

Gerhard Haering gh at ghaering.de
Tue Oct 19 03:36:29 EDT 2004


On Tue, Oct 19, 2004 at 12:03:08AM +0000, LutherRevisited wrote:
> [...]
> s = smtplib.SMTP('smtp.aol.com', 587)
> [...]
>         s.docmd('AUTH', 'PLAIN')
> [...]

Don't reinvent the wheel. Use .login instead(). Also, PLAIN doesn't
mean you send the password in plain text (it's encoded with base64).
And the developers of the Python standard library - in this case, me
:-P - already did that work once for you in .login() of the SMTP
object ;-)

-- Gerhard



More information about the Python-list mailing list