- Introduced `imap_connect.py` for handling IMAP email interactions. - Created `run.py` to manage execution based on the selected mode (IMAP or EWS). - Updated Dockerfile and .env.dev to include necessary environment variables. - Enhanced logging and email processing in `exchange_connect.py`. - Added `weasyprint` and `imapclient` to requirements.
10 lines
267 B
Python
10 lines
267 B
Python
import os
|
|
from imap_connect import run as run_imap
|
|
from exchange_connect import run as run_ews
|
|
mode = os.environ.get('mode')
|
|
if mode == 'IMAP':
|
|
run_imap()
|
|
elif mode == 'EWS':
|
|
run_ews()
|
|
else:
|
|
raise ValueError("Invalid mode specified. Use 'IMAP' or 'EWS'.") |