how to use smtp starttls() encryption?

Gerhard =?unknown-8bit?Q?H=E4ring?= gerhard.haering at gmx.de
Fri Nov 1 03:32:12 EST 2002


* Xu, C.S. <xucs007 at yahoo.com> [2002-10-31 23:25 -0800]:
> I did download the openssl-0.9.6g and compiled/installed, and I found
> mandrake 9.0 already use openssl-0.9.6g; but the python 2.2.2
> I downloaded, after compiling still shows it used 0.9.5 ssl.
> Exact same error when I tried to use python 2.2.2 to send out
> emails.
> 
> Now I've setup an temp. email account for you guys to help me
> out, see whether you can use this account send emails first: [...]

Seems to work:

gerhard at gargamel:~$ python
Python 2.2.2 (#1, Oct 18 2002, 03:24:30)
[GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> import smtplib
>>> s = smtplib.SMTP("mail.offleasecomputer.net")
>>> s.starttls()
(220, 'OpenSSL/0.9.5beta go ahead')
>>> s.sendmail("gerhard.haering at gmx.de", ["testpythonsmtp at offleasecomputer.net"
], "hello, does it work?")
{}
>>> s.quit()

-- Gerhard




More information about the Python-list mailing list