initiate starttls if port 587

This commit is contained in:
Muhammet Fatih Doğan
2020-09-15 05:03:50 +03:00
committed by GitHub
parent 6e076aac5e
commit 672556c7c9

View File

@@ -259,6 +259,10 @@ def saveSMTPSettings(request):
try:
verifyLogin = smtplib.SMTP(str(smtpHost), int(smtpPort))
if int(smtpPort) == 587:
verifyLogin.starttls()
verifyLogin.login(str(smtpUserName), str(smtpPassword))
writeToFile = open(smtpPath, 'w')