no need to re-import smtplib

This causes a variable scoping issue breaks the SMTP function if imported
This commit is contained in:
Christopher McAvaney
2025-05-08 14:36:51 +10:00
parent ebb9218600
commit 0ab8cc0f41

View File

@@ -2707,7 +2707,6 @@ def send_expiration_notifications(manual_trigger=False):
try:
# Use SMTP_SSL for port 465, regular SMTP for other ports
if smtp_port == 465:
import smtplib
logger.info(f"Using SMTP_SSL connection for port 465")
server = smtplib.SMTP_SSL(smtp_host, smtp_port)
else: