SMTP Authentication

Achim Domma domma at procoders.net
Mon Nov 3 15:41:37 EST 2003


Hi,

I try to authenticate via script to my mail server. I found some hints via
google, that SMTP authentication is a problem, but no solution. Using
set_debuglevel(1), I can see something like that:

send: 'ehlo [10.0.0.35]\r\n'
reply: '250-essen115.server4free.de Hello p50837A3A.dip.t-dialin.net
[80.131.122
.58], pleased to meet you\r\n'
reply: '250-ENHANCEDSTATUSCODES\r\n'
[...]
reply: '250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5\r\n'
[...]
reply: retcode (250); Msg: essen115.server4free.de Hello
p50837A3A.dip.t-dialin.
net [80.131.122.58], pleased to meet you
[...]
AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5
[...]
send: 'AUTH CRAM-MD5\r\n'
reply: '334
PDM0NDE5NDYxMzAuMTA5MjcxNDFAZXNzZW4xMTUuc2VydmVyNGZyZWUuZGU+\r\n'
reply: retcode (334); Msg:
PDM0NDE5NDYxMzAuMTA5MjcxNDFAZXNzZW4xMTUuc2VydmVyNGZyZ
WUuZGU+
send: 'd2ViMXAxIDk1Yzk5ZDM3ZWI1MDMxZmI4YjFmNjJhNmY2MjUzMGYy\r\n'
reply: '535 5.7.0 authentication failed\r\n'
reply: retcode (535); Msg: 5.7.0 authentication failed
Traceback (most recent call last):
  File "C:\scripts\wg_plan.py", line 41, in ?
    server.login('my_login',pwd)
  File "C:\Python23\lib\smtplib.py", line 583, in login
    raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, '5.7.0 authentication failed')

Can somebody give me a hint on how to encode the pwd? Or another way to send
mail, if the server requires authentication?

regards,
Achim






More information about the Python-list mailing list