ASPP / massmail

Script to send mass mail
2 stars 56 forks source link

Use context manager for handling SMTP connections #11

Open jakobj opened 7 years ago

jakobj commented 7 years ago

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.