mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-01 20:29:06 +01:00
initiate starttls if port 586
This commit is contained in:
@@ -279,6 +279,10 @@ class emailMarketing(multi.Thread):
|
||||
else:
|
||||
self.verifyHost = SMTPHosts.objects.get(host=self.extraArgs['host'])
|
||||
self.smtpServer = smtplib.SMTP(str(self.verifyHost.host), int(self.verifyHost.port))
|
||||
|
||||
if int(self.verifyHost.port) == 587:
|
||||
self.smtpServer.starttls()
|
||||
|
||||
self.smtpServer.login(str(self.verifyHost.userName), str(self.verifyHost.password))
|
||||
return 1
|
||||
except smtplib.SMTPHeloError:
|
||||
|
||||
Reference in New Issue
Block a user