Add IMAP support and refactor environment configuration

- 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.
This commit is contained in:
Simon Zeyer
2025-06-09 10:53:08 +00:00
parent e19edee916
commit 5127caed03
7 changed files with 194 additions and 56 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
FROM python:3.10-bullseye
ENV mode="EWS"
ENV username=
ENV password=
ENV server="exchange.sankt-wendel.de"
@@ -61,4 +62,4 @@ COPY ./app .
COPY *.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates
CMD [ "sh","-c","/etc/init.d/cups start && python3 /usr/src/app/exchange_connect.py" ]
CMD [ "sh","-c","/etc/init.d/cups start && python3 /usr/src/app/run.py" ]