@weijingwei/email 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +12 -1
- package/package.json +3 -5
- package/dist/cli.js +0 -66615
package/dist/bundle.js
CHANGED
|
@@ -82751,7 +82751,7 @@ async function getEmail(imapConfig, uid, folder = "INBOX") {
|
|
|
82751
82751
|
return {
|
|
82752
82752
|
uid,
|
|
82753
82753
|
from: parsed.from?.text || "",
|
|
82754
|
-
to: parsed.to
|
|
82754
|
+
to: extractAddresses(parsed.to),
|
|
82755
82755
|
subject: parsed.subject || "(\u65E0\u4E3B\u9898)",
|
|
82756
82756
|
date: parsed.date?.toISOString() || "",
|
|
82757
82757
|
flags: item.attributes.flags || [],
|
|
@@ -82764,6 +82764,17 @@ async function getEmail(imapConfig, uid, folder = "INBOX") {
|
|
|
82764
82764
|
connection.end();
|
|
82765
82765
|
}
|
|
82766
82766
|
}
|
|
82767
|
+
function extractAddresses(address) {
|
|
82768
|
+
if (!address)
|
|
82769
|
+
return [];
|
|
82770
|
+
if (Array.isArray(address)) {
|
|
82771
|
+
return address.map((a) => a.text);
|
|
82772
|
+
}
|
|
82773
|
+
if (typeof address === "object" && "text" in address) {
|
|
82774
|
+
return [address.text];
|
|
82775
|
+
}
|
|
82776
|
+
return [];
|
|
82777
|
+
}
|
|
82767
82778
|
function extractAttachmentInfo(parsed) {
|
|
82768
82779
|
if (!parsed.attachments || parsed.attachments.length === 0) {
|
|
82769
82780
|
return [];
|
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weijingwei/email",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Email MCP Server - SMTP/IMAP email operations via MCP protocol",
|
|
5
5
|
"main": "dist/bundle.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"email-mcp": "./dist/
|
|
7
|
+
"email-mcp": "./dist/bundle.js"
|
|
8
8
|
},
|
|
9
9
|
"files": ["dist", "README.md"],
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "
|
|
12
|
-
"build:mcp": "esbuild src/index.ts --bundle --platform=node --outfile=dist/bundle.js --format=cjs",
|
|
13
|
-
"build:cli": "esbuild src/cli.ts --bundle --platform=node --outfile=dist/cli.js --format=cjs --banner:js=\"#!/usr/bin/env node\"",
|
|
11
|
+
"build": "esbuild src/index.ts --bundle --platform=node --outfile=dist/bundle.js --format=cjs",
|
|
14
12
|
"prepublishOnly": "npm run build"
|
|
15
13
|
},
|
|
16
14
|
"keywords": ["mcp", "model-context-protocol", "email", "smtp", "imap", "claude", "ai"],
|