Remove hardcoded Zoho credentials - now users input credentials through frontend
This commit is contained in:
+16
-4
@@ -12,13 +12,25 @@ from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
class EmailProcessor:
|
||||
def __init__(self, agency_domains: List[str] = None):
|
||||
self.zoho_client = ZohoClient()
|
||||
self.triage = EmailTriage()
|
||||
def __init__(self, agency_domains=None):
|
||||
"""Initialize the email processor"""
|
||||
self.agency_domains = agency_domains or ['projects@manaknightdigital.com']
|
||||
|
||||
# Load config to get Zoho credentials
|
||||
from app import load_config
|
||||
config = load_config()
|
||||
|
||||
# Initialize Zoho client with credentials from config
|
||||
self.zoho_client = ZohoClient(
|
||||
email=config.get('zoho_email'),
|
||||
app_password=config.get('zoho_app_password')
|
||||
)
|
||||
|
||||
# Initialize thread tracker
|
||||
self.tracker = ThreadTracker()
|
||||
self.triage = EmailTriage()
|
||||
self.ai_analyzer = AIAnalyzer()
|
||||
self.whatsapp_sender = WhatsAppSender()
|
||||
self.agency_domains = agency_domains or ['projects@manaknightdigital.com']
|
||||
|
||||
def process_emails(self, max_results: int = 100, send_alerts: bool = True, days_back: int = 7, time_frames: List[Dict] = None) -> Dict[str, Any]:
|
||||
"""Main processing pipeline with optional WhatsApp alerts"""
|
||||
|
||||
Reference in New Issue
Block a user