Install
openclaw skills install lel-mailSend and read email via a combination of python and bash scripts which makes use of the main agent for reasoning and logic. This skill enables the agent to write to memory based on contents in the email and to reach out to the user either to notify them of happenings or to request inputs to respond. This skill also contains a python script to read and manage the email queue containing functionality to list pending outgoing emails and delete emails before they can be sent out. Please note that this skill enables the agent to act upon received emails by adding to agent memory and sending responses
openclaw skills install lel-mailCreate ~/.config/lel-mail/config.json:
[
{
"provider": "gmail",
"config": {
"smtp": {
"server": "smtp.gmail.com", //Default url
"port": 587 //Default port
},
"imap": {
"server": "imap.gmail.com", //Default url
"port": 993 //Default port
}
},
"auth": {
"user": "example@gmail.com",
"password": "XXXX XXXX XXXX XXXX" //Gmail Requires App Specific Password Rather Than Your Normal Password
},
"can_send": true,
"can_read": true
}
]
Set up a simple cron job which runs the following command every 5 minutes with a randomised 30-90 second delay. Confirm with user the interval to be used:
~/.openclaw/workspace/skills/lel-mail/scripts/email_sender_daemon.sh
~/.openclaw/workspace/skills/lel-mail/scripts/check_email.sh <USER_EMAIL>~/.openclaw/workspace/skills/lel-mail/scripts/email_send.sh --sender <sender> --recipient <recipient> --subject <subject> --body <body> [--cc ...] [--bcc ...] Note: if using BCC/CC note that CC/BCC are comma-separated listsOutgoing emails are scheduled to send with a random delay (30-90 seconds). You can list or delete these before they are sent.
List all queued emails:
python3 ~/.openclaw/workspace/skills/lel-mail/scripts/manage_queue.py --list
Delete a specific email by ID:
python3 ~/.openclaw/workspace/skills/lel-mail/scripts/manage_queue.py --delete <ID>
Prompt user to assist when errors occur due to missing/invalid credentials/configuration