--- Ramashish Baranwal <email@example.com>
> > 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.
To help debug this, you may want to try the following.
> 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?
1) Copy smptlib.py into your local directory. On my
box, you can find it here, or import sys; print
sys.path to help find it on your box:
2) Go the login() method, add some print statements
there to see what's going on.
I admit to not being an SMTP expert nor fully
understanding the code at first glance, but here is
some code iin smtplib.py that suggests you're close to
getting this working, to the extent that your server
wants base64 encoding:
def encode_cram_md5(challenge, user,
challenge = base64.decodestring(challenge)
response = user + " " +
return encode_base64(response, eol="")
Hope this helps.
___________________________________________________________________________ _________You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.