Hey I have a windows server running python CGI scripts and I'm having a little trouble with smtplib. The server is running python 2.1 (unfortunately and I can not upgrade it). Anyway I have the following code:
session = smtplib.SMTP("smtp-auth.ourhosting.com", 587)
session.login(smtpuser, smtppass)
and it's giving me this error:
exceptions.AttributeError : SMTP instance has no attribute 'login' :
I'm assuming this is because the login() method was added after python 2.1. so how do I fix this?
I have to either add the module by uploading the files to the same directory as the cgi script (though I believe smtplib is written in C and needs to be compiled which we can't do on this server)
OR
Do it whatever way is expected by the libsmtp in python 2.1
Thanks so much!