Email Plugin
OpenClaw plugin for working with a real mailbox over IMAP and SMTP.
It covers the expected operational email surface: list mailboxes, search recent messages, read a full message, update read or starred state, move a message, send a new email, and reply to an existing thread.
Config
{
plugins: {
entries: {
email: {
enabled: true,
config: {
imap: {
host: "imap.gmail.com",
port: 993,
secure: true,
username: "me@example.com",
password: "YOUR_IMAP_APP_PASSWORD", // pragma: allowlist secret
},
smtp: {
host: "smtp.gmail.com",
port: 465,
secure: true,
username: "me@example.com",
password: "YOUR_SMTP_APP_PASSWORD", // pragma: allowlist secret
from: "me@example.com",
name: "Your Name",
},
defaultMailbox: "INBOX",
defaultSearchLimit: 10,
defaultSearchWindow: 100,
requireExplicitSendConfirmation: true,
},
},
},
},
}
If smtp.username, smtp.password, or smtp.from are omitted, the plugin falls back to the IMAP credentials where possible.
Tools
email_mailboxes_listemail_messages_searchemail_message_getemail_message_updateemail_message_moveemail_sendemail_reply
Usage
After enabling email, ask for things like:
- List my mailboxes and tell me which ones look like archive folders.
- Search INBOX for unread emails from billing@vendor.com about invoices from the last week.
- Open message 4821 in INBOX and summarize what it asks for.
- Mark message 4821 as read and starred.
- Move message 4821 from INBOX to Archive.
- Send an email to finance@example.com with subject "Q2 draft" and attach
/tmp/q2.xlsx. - Reply to message 4821 saying that I will review it today.
Notes
email_messages_searchscans the most recentdefaultSearchWindowmessages in the selected mailbox and returns up todefaultSearchLimitmatches unless overridden.email_sendandemail_replyrequireconfirm=trueby default so the agent cannot send a real email without an explicit confirmation step.- Most hosted providers require an app password or provider-specific IMAP/SMTP credentials. OAuth login flows are out of scope for this plugin.