A: 

That code you've found seems to be for an older version, considering the deprecation warning. Maybe you can get by with the stdlib: There is a SMTP_SSL class as of Python 2.6, and as of at least 2.4 there is a starttls method on the plaintext SMTP class.

Marian
Grrr, after searching around, it looks like the SMTP_SSL class doesn't work (is broken). I'm completely stuck and frustrated!
jakecar
Did you try it? Issue 4066 is fixed in 2.6.3.
wRAR
I used the code here: http://www.gossamer-threads.com/lists/python/python/770500 with the changes proposed by the first two posters and got this error:Traceback (most recent call last): File "emailer.py", line 8, in <module> mail_server.login('USERNAME', 'PW') File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py", line 589, in login raise SMTPAuthenticationError(code, resp)smtplib.SMTPAuthenticationError: (535, '5.7.0 Error: authentication failed: authentication failure')
jakecar