> > > 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 > > Are you sure that your SMTP server uses this type of authentication? > Some SMTP servers use POP3 followed by SMTP to authenticate instead. > > use telnet to verify, this link might help. > > http://www.computerperformance.co.uk/exchange2003/exchange2003_SMTP_A... >
Hi Larry, Thanks for the reply. I have worked according to the steps in the link you provided. From that it seems my server accepts base64 encoded username and password. I am able to login this way. How to give the same in smtplib? Ram -- http://mail.python.org/mailman/listinfo/python-list