Since Python3.3, smtplib supports the with statement (https://docs.python.org/3.5/library/smtplib.html). This should be used to make sure the QUIT statement is automatically executed with the script exits. A workaround for older versions should be provided.
Since Python3.3, smtplib supports the
with
statement (https://docs.python.org/3.5/library/smtplib.html). This should be used to make sure theQUIT
statement is automatically executed with the script exits. A workaround for older versions should be provided.