[2ff88f42] Implementierung E-Mail-Dokument-Automatisierung und technischer Check der Versand-Blocker. Workaround via SuperOffice-Aktivitäten etabliert.

Implementierung E-Mail-Dokument-Automatisierung und technischer Check der Versand-Blocker. Workaround via SuperOffice-Aktivitäten etabliert.
This commit is contained in:
2026-02-28 14:25:25 +00:00
parent 176e1f89f4
commit 4eccb55eab
10 changed files with 309 additions and 55 deletions

View File

@@ -0,0 +1,38 @@
import os
import json
import logging
import sys
from dotenv import load_dotenv
load_dotenv(override=True)
from superoffice_client import SuperOfficeClient
logging.basicConfig(level=logging.INFO)
sys.stdout.reconfigure(line_buffering=True)
def attempt_send(to_email: str):
client = SuperOfficeClient()
# Payload for Agents/EMail/Send
# It expects an array of "EMail" objects
payload = [
{
"To": [{"Value": to_email, "Address": to_email}],
"Subject": "Test from SuperOffice Agent API",
"HTMLBody": "<h1>Hello!</h1><p>This is a test from the Agents/EMail/Send endpoint.</p>",
"From": {"Value": "system@roboplanet.de", "Address": "system@roboplanet.de"} # Try to force a sender
}
]
print(f"🚀 Attempting POST /Agents/EMail/Send to {to_email}...")
try:
# Note: The endpoint might be v1/Agents/EMail/Send
res = client._post("Agents/EMail/Send", payload)
if res:
print("✅ Success! Response:", json.dumps(res, indent=2))
else:
print("❌ Request failed (None returned).")
except Exception as e:
print(f"❌ Exception during send: {e}")
if __name__ == "__main__":
attempt_send("floke.com@gmail.com")