Files
Brancheneinstufung2/connector-superoffice/EMAIL_WORKAROUND_REPORT.md

26 lines
1.6 KiB
Markdown

# Status Report: Email Sending Workaround (Feb 28, 2026)
## Problem
The automated dispatch of emails via the SuperOffice API (using `/Shipment` or `/Mailing` endpoints) is currently blocked by a **500 Internal Server Error** in the `Cust26720` tenant environment. Additionally, created Documents often throw a "Cannot check out" error when users try to open them directly, likely due to missing Web Tools or strict SharePoint integration policies for API-generated files.
## Solution / Workaround
We have implemented a robust "Activity-Based" workaround that ensures the email content is visible and actionable for the user.
1. **Draft Creation:** The system creates a Document (Template: "Ausg. E-Mail") via API.
2. **Content Upload:** The email body is uploaded as a binary stream to prevent "0kb file" errors.
3. **Activity Mirroring:** Crucially, a linked **Appointment (Task)** is created. The full email body is copied into the `Description` field of this appointment.
4. **Direct Access:** The user is provided with a direct link to the **Appointment**, bypassing the problematic Document checkout process.
## Verification
* **Target:** Person ID 193036 (Christian Test2 / floke.com@gmail.com)
* **Document ID:** 334055 (Content uploaded successfully)
* **Activity ID:** 992236 (Contains full text)
* **Result:** The user can open the Activity link, copy the pre-generated text, and send it via their standard mail client or SuperOffice MailLink.
## Usage
Run the test script to generate a new draft for any person:
```bash
python3 connector-superoffice/create_email_test.py <PersonID>
```
The script outputs the "Safe Link" to the Activity.