SMTPAuthenticationError

Ramashish Baranwal ramashish.lists at gmail.com
Tue May 29 12:58:49 EDT 2007


Hi,

I am trying to send a mail using smtplib. My server requires me to
authenticate, for this I'm using SMTP.login function. However it
fails-

>>> server = smtplib.SMTP(host='mail.domain', port=25)
>>> server.login('username', 'password')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/smtplib.py", line 587, in login
    raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, 'authorization failed
(#5.7.0)')

I am sure that I am giving the correct credentials. The same works in
Thunderbird. Am I missing something here or am I supposed to use some
other library for this?

Thanks in advance,
Ram




More information about the Python-list mailing list