Remove hardcoded Zoho credentials - now users input credentials through frontend
This commit is contained in:
+8
-4
@@ -9,12 +9,16 @@ from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
class ZohoClient:
|
||||
def __init__(self):
|
||||
def __init__(self, email=None, app_password=None):
|
||||
self.imap_server = "imap.zoho.com"
|
||||
self.imap_port = 993
|
||||
self.email = os.getenv("ZOHO_EMAIL", "projects@manaknightdigital.com")
|
||||
# Use app password instead of regular password
|
||||
self.app_password = os.getenv("ZOHO_APP_PASSWORD", "s7t8t9j6ebjm")
|
||||
# Use provided credentials or fall back to environment variables
|
||||
self.email = email or os.getenv("ZOHO_EMAIL", "")
|
||||
self.app_password = app_password or os.getenv("ZOHO_APP_PASSWORD", "")
|
||||
|
||||
if not self.email or not self.app_password:
|
||||
raise ValueError("Zoho email and app password must be provided")
|
||||
|
||||
self.connection = None
|
||||
self._connect()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user