how to use smtp starttls() encryption?

Martin v. Loewis martin at v.loewis.de
Fri Oct 11 01:57:42 EDT 2002


xucs007 at yahoo.com (Xu, C.S.) writes:

> Anybody can teach me? Previously I can just use the
> smtp.login(user, password) to authenticate my machine
> before sending out emails.

Now, before invoking login, you invoke starttls. This causes the
connection to become encrypted, which, in turn, protects your password
against being snooped.

Since you are not verifying any certificates in this mode of
operation, you are prone to a man-in-the-middle attack. However, this
is the usual operation of starttls in the internet, so you should not
worry about this too much.

Regards,
Martin




More information about the Python-list mailing list