[newbie] smtplib.login()?

P

PA

Hello,

I'm trying to use smtplib.login() to authenticate against a SMTP
server...

server = smtplib.SMTP( 'localhost', 10025 )
server.set_debuglevel(1)
server.login( 'user', 'password' )

send: 'ehlo host.local\r\n'
reply: '250-host.local Hello localhost\r\n'
reply: '250-AUTH LOGIN PLAIN\r\n'
reply: '250 STARTTLS\r\n'
reply: retcode (250); Msg: host.local Hello localhost
AUTH LOGIN PLAIN
STARTTLS
send: 'AUTH PLAIN dXNlcgB1c2VyAHBhc3N3b3Jk\r\n'
reply: '535 Authentication failed\r\n'
reply: retcode (535); Msg: Authentication failed

The above code results in "dXNlcgB1c2VyAHBhc3N3b3Jk" being send to the
server. Which, after decoding, looks like "useruserpassword". Note that
the user name is there twice. Which is going to seriously hamper any
chance of authenticating properly :/

What am I doing wrong? Why is the user name being encoded twice?

Thanks for any help :)

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top