mishaturnbull/EmailGUI

Automatic STARTTLS support detection

Closed this issue · 3 comments

EmailSender._launch().connect() hangs on a server that does not require TLS or login authentication.

I believe this was closed in c8e77eb. Need to confirm.

Was technically not closed. Issue remains -- c877eb only fixed the issue for a local Mercury server. Mercury, by default, does not require nor allow SSL/TLS connections therefore hangs on a STARTTLS smtp command. THAT particular issue was fixed; but not the more general case for non-authenticated servers.

Discovered that Python's smtplib.SMTP class has a .has_extn(...) method, which can be used like:

if server.has_extn("STARTTLS"):
    server.starttls()