diff --git a/vitepress-docs/docs/en/guide/feature/mail-api.md b/vitepress-docs/docs/en/guide/feature/mail-api.md index 1dc631db..b20cc887 100644 --- a/vitepress-docs/docs/en/guide/feature/mail-api.md +++ b/vitepress-docs/docs/en/guide/feature/mail-api.md @@ -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. diff --git a/vitepress-docs/docs/zh/guide/feature/mail-api.md b/vitepress-docs/docs/zh/guide/feature/mail-api.md index 7669fd33..88dd630a 100644 --- a/vitepress-docs/docs/zh/guide/feature/mail-api.md +++ b/vitepress-docs/docs/zh/guide/feature/mail-api.md @@ -17,6 +17,8 @@ res = requests.get( ) ``` +**注意**:`/api/mails` 按设计返回的是原始 RFC822 数据(如 `source`/`raw`),不保证直接包含 `subject`、`text`、`html` 等已解析字段。若要直接读取正文,请在客户端侧解析 `raw`(例如 `mail-parser-wasm`、`postal-mime`)。 + ## admin 邮件 API 支持 `address` 过滤 @@ -43,6 +45,8 @@ response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` +**注意**:`/admin/mails` 与 `/api/mails` 一致,返回的是邮件数据库中的 raw MIME 内容;如需正文/主题等可读字段,请在客户端自行解析 `raw`。 + **注意**:后端 API 已移除关键词过滤功能。如需按内容过滤邮件,请使用前端界面的过滤输入框,该功能可过滤当前显示的页面。 ## admin 删除邮件 API @@ -151,4 +155,6 @@ response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` +**注意**:`/user_api/mails` 同样返回原始 RFC822 内容;请在客户端解析后提取 `subject`、`text`、`html`。 + **注意**:后端 API 已移除关键词过滤功能。如需按内容过滤邮件,请使用前端界面的过滤输入框,该功能可过滤当前显示的页面。