通过IMAP连接163/126/yeah.net(Coremail)邮箱,读取收件箱、搜索邮件,并通过SMTP发送邮件。用户询问查邮件、读取邮件时激活。
163/126/yeah.net use Coremail which requires an IMAP ID command before any mailbox operation, otherwise returns "Unsafe Login" even with valid credentials.
Credentials in ~/.openclaw/email-monitor/.env:
text
IMAP_SERVER=imap.163.com
IMAP_PORT=993
SMTP_SERVER=smtp.163.com
SMTP_PORT=465
EMAIL_ADDRESS=your@163.com
EMAIL_PASSWORD=your_auth_code
The EMAIL_PASSWORD is the 授权码 (authorization code), not the login password. Users obtain it from: 163 Mail → Settings → POP3/SMTP/IMAP → Enable IMAP → Get authorization code.
ProviderIMAP ServerSMTP Server163.comimap.163.com:993smtp.163.com:465126.comimap.126.com:993smtp.126.com:465yeah.netimap.yeah.net:993smtp.yeah.net:465
All operations use scripts/mail_client.py:
bash
# Read unread emails
python3 scripts/mail_client.py read --unread
# Read latest N emails
python3 scripts/mail_client.py read --latest 10
# Search emails by keyword
python3 scripts/mail_client.py search "amazon"
# Search by sender
python3 scripts/mail_client.py search --from "no-reply@amazon.com"
# Search by date range
python3 scripts/mail_client.py search --since 2026-03-01 --before 2026-03-23
# Send email
python3 scripts/mail_client.py send --to recipient@example.com --subject "Hello" --body "Content here"
# Send with attachment
python3 scripts/mail_client.py send --to recipient@example.com --subject "Report" --body "See attached" --attach /path/to/file.pdf
Pass --env /path/to/.env to override default config location.
ErrorCauseFixUnsafe LoginMissing ID commandUse this skill's script (handles automatically)AUTHENTICATIONFAILEDWrong auth codeRegenerate 授权码 in 163 web settingsLOGIN failedIMAP not enabledEnable IMAP in 163 Mail → Settings