Domanda

I'm working with Python 2.3 and I need to send e-mails with SSL.

According to the docs, SMTP_SSL was added in Python 2.6.

Is there a way to use SSL also in Python 2.3 (maybe with a third-party module)?

È stato utile?

Soluzione

Maybe you can just use starttls() just like:

smtp = smtplib.SMTP(mailhost)
smtp.starttls()

In SMTP_SSL doc you can find:

SMTP_SSL should be used for situations where SSL is required from the beginning of the connection and using starttls() is not appropriate.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top