@zlr_236/email-marketing 1.1.0 → 1.1.2

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/package.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "name": "@zlr_236/email-marketing",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Professional Email Marketing & Auto-Reply extension for OpenClaw. Features: Bulk Sending, HTML Rendering, Gmail Anti-Spam, and FAQ-based Auto-Reply.",
5
5
  "main": "index.js",
6
- "keywords": ["openclaw", "email-marketing", "automation", "bulk-sender"],
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "openclaw",
11
+ "email-marketing",
12
+ "automation",
13
+ "bulk-sender"
14
+ ],
7
15
  "author": "zhenglr",
8
16
  "license": "MIT",
9
- "dependencies": {
10
- "pandas": "*",
11
- "openpyxl": "*"
12
- }
13
- }
17
+ "dependencies": {}
18
+ }
@@ -0,0 +1,2 @@
1
+ pandas
2
+ openpyxl
@@ -10,7 +10,9 @@ import json
10
10
  import time
11
11
 
12
12
  # --- 配置信息 (从环境变量读取) ---
13
- IMAP_HOST = os.getenv("EMAIL_IMAP_HOST", "smtp.corp.netease.com")
13
+ IMAP_HOST = os.getenv("EMAIL_IMAP_HOST", "imap.corp.netease.com")
14
+ if IMAP_HOST == "smtp.corp.netease.com":
15
+ IMAP_HOST = "imap.corp.netease.com"
14
16
  IMAP_PORT = int(os.getenv("EMAIL_IMAP_PORT", 993))
15
17
  SMTP_HOST = os.getenv("EMAIL_SMTP_HOST", "smtp.corp.netease.com")
16
18
  SMTP_PORT = int(os.getenv("EMAIL_SMTP_PORT", 465))
@@ -25,11 +27,8 @@ def get_unread_emails():
25
27
  try:
26
28
  mail = imaplib.IMAP4_SSL(IMAP_HOST, IMAP_PORT)
27
29
  mail.login(EMAIL_USER, EMAIL_PASS)
28
- # 选择发件箱以检查是否已回复
29
- mail.select('"[Gmail]/Sent Mail"' if "gmail" in IMAP_HOST else "Sent Messages") # 简化逻辑,实际可能需适配不同服务商
30
- # 这里为了简化,我们改为:在收件箱中只处理未读邮件,或者通过数据库记录已处理的 Message-ID
31
30
 
32
- mail.select("inbox")
31
+ mail.select("INBOX")
33
32
  # 搜索所有未读且未回复标志的邮件
34
33
  status, response = mail.search(None, '(UNSEEN)')
35
34
  unread_msg_nums = response[0].split()
@@ -0,0 +1,7 @@
1
+ {
2
+ "total": 3,
3
+ "success": 3,
4
+ "failed": [],
5
+ "start_time": "2026-02-27 10:38:24",
6
+ "end_time": "2026-02-27 10:38:45"
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "sent_total": 3,
3
+ "replied_total": 0,
4
+ "bounce_total": 0,
5
+ "replied_details": [],
6
+ "bounce_details": [],
7
+ "check_time": "2026-02-27 10:46:53"
8
+ }