uj könyvtär Scripts
This commit is contained in:
24
Scripts/python/folder_list.py
Normal file
24
Scripts/python/folder_list.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import imaplib
|
||||
|
||||
# ===== Einstellungen =====
|
||||
IMAP_SERVER = "aps-exch01.aps.local"
|
||||
IMAP_PORT = 993
|
||||
USERNAME = "svc.fax_bestellung@aps-hh.de"
|
||||
PASSWORD = "UyCcxoP8J^3yllLN/m*5"
|
||||
# USERNAME = "i.meszely@aps-hh.de"
|
||||
# PASSWORD = "virgI6774#Maci"
|
||||
# IMAP-Verbindung aufbauen
|
||||
mail = imaplib.IMAP4_SSL(IMAP_SERVER, IMAP_PORT)
|
||||
mail.login(USERNAME, PASSWORD)
|
||||
|
||||
# Alle verfügbaren Mailboxen/Mappen listen
|
||||
status, folders = mail.list()
|
||||
if status == "OK":
|
||||
print("Verfügbare Ordner/Mailboxen:")
|
||||
for folder in folders:
|
||||
print(folder.decode())
|
||||
else:
|
||||
print("Fehler beim Abrufen der Ordnerliste.")
|
||||
|
||||
# Verbindung schließen
|
||||
mail.logout()
|
||||
Reference in New Issue
Block a user