mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-03-01 09:50:44 +01:00
minor fix to email marketing tool
This commit is contained in:
@@ -154,8 +154,8 @@ class emailMarketing(multi.Thread):
|
||||
smtpServer = smtplib.SMTP('127.0.0.1')
|
||||
else:
|
||||
verifyHost = SMTPHosts.objects.get(host=self.extraArgs['host'])
|
||||
smtpServer = smtplib.SMTP(verifyHost.host, int(verifyHost.port))
|
||||
smtpServer.login(verifyHost.userName, verifyHost.password)
|
||||
smtpServer = smtplib.SMTP(str(verifyHost.host), int(verifyHost.port))
|
||||
smtpServer.login(str(verifyHost.userName), str(verifyHost.password))
|
||||
except smtplib.SMTPHeloError:
|
||||
logging.CyberCPLogFileWriter.statusWriter(self.extraArgs['tempStatusPath'],
|
||||
'The server didnt reply properly to the HELO greeting.')
|
||||
|
||||
@@ -395,8 +395,8 @@ class EmailMarketingManager:
|
||||
defaultHost.save()
|
||||
|
||||
try:
|
||||
verifyLogin = smtplib.SMTP(smtpHost, int(smtpPort))
|
||||
verifyLogin.login(smtpUserName, smtpPassword)
|
||||
verifyLogin = smtplib.SMTP(str(smtpHost), int(smtpPort))
|
||||
verifyLogin.login(str(smtpUserName), str(smtpPassword))
|
||||
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
|
||||
@@ -496,8 +496,8 @@ class EmailMarketingManager:
|
||||
else:
|
||||
try:
|
||||
verifyHost = SMTPHosts.objects.get(id=id)
|
||||
verifyLogin = smtplib.SMTP(verifyHost.host, int(verifyHost.port))
|
||||
verifyLogin.login(verifyHost.userName, verifyHost.password)
|
||||
verifyLogin = smtplib.SMTP(str(verifyHost.host), int(verifyHost.port))
|
||||
verifyLogin.login(str(verifyHost.userName), str(verifyHost.password))
|
||||
|
||||
data_ret = {"status": 1, 'message': 'Login successful.'}
|
||||
json_data = json.dumps(data_ret)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user