docs: clarify mail API raw payload semantics (#906)

docs: clarify mail API returns raw RFC822 content
This commit is contained in:
Dream Hunter
2026-03-19 20:31:22 +08:00
committed by GitHub
parent 79b9835fa2
commit e77ab12140
2 changed files with 12 additions and 0 deletions
@@ -17,6 +17,8 @@ res = requests.get(
)
```
**Note**: `/api/mails` returns raw RFC822 data by design (for example `source`/`raw`), and it does not guarantee parsed fields such as `subject`, `text`, or `html`. Parse the raw source on the client side (for example with `mail-parser-wasm` or `postal-mime`) if you need readable message content.
## Admin Mail API
Supports `address` filter
@@ -43,6 +45,8 @@ response = requests.get(url, headers=headers, params=querystring)
print(response.json())
```
**Note**: `/admin/mails` follows the same design as `/api/mails`: it returns stored raw MIME data. If you need readable subject/body, parse the raw content on the client side.
**Note**: Keyword filtering has been removed from the backend API. If you need to filter emails by content, please use the frontend filter input in the UI, which filters the currently displayed page.
## Admin Delete Mail API
@@ -151,4 +155,6 @@ response = requests.get(url, headers=headers, params=querystring)
print(response.json())
```
**Note**: `/user_api/mails` also returns raw RFC822 content from storage; parse it in your client to extract `subject`, `text`, and `html`.
**Note**: Keyword filtering has been removed from the backend API. If you need to filter emails by content, please use the frontend filter input in the UI, which filters the currently displayed page.