The script must use SSL/TLS (port 465 or 587 for SMTP; 993 for IMAP) to encrypt data in transit. Plain-text connections are a high-severity finding.

Could you clarify what you're referring to? For example:

except Exception as e: return f"Error: e"