Set Up Email
Connect Snippbot to an email account so agents can read incoming emails (via IMAP) and send replies or new messages (via SMTP). The IMAP tool is part of the built-in scheduler tool suite.
What email enables
Section titled “What email enables”With email configured, agents and scheduled jobs can:
- Monitor an inbox and respond to emails automatically
- Parse incoming requests and route them to the right agent
- Send reports, summaries, and alerts via email
- Integrate email-based workflows (approval via reply, etc.)
IMAP configuration
Section titled “IMAP configuration”-
Go to Settings → Profile
-
Enter your IMAP settings in the form fields:
Field Example value Host imap.gmail.comPort 993SSL Enabled Username your@email.comPassword Your app password (see note below) Mailbox INBOX -
Test the connection — click Test IMAP to verify credentials
-
Save
SMTP configuration
Section titled “SMTP configuration”-
In Settings → Profile, scroll to SMTP
-
Enter SMTP settings in the form fields:
Field Example value Host smtp.gmail.comPort 587STARTTLS Enabled Username your@email.comPassword Your app password From Snippbot <your@email.com> -
Click Test SMTP to send a test email to yourself
-
Save
Common provider settings
Section titled “Common provider settings”| Provider | IMAP host | IMAP port | SMTP host | SMTP port |
|---|---|---|---|---|
| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |
| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |
| Fastmail | imap.fastmail.com | 993 | smtp.fastmail.com | 587 |
| ProtonMail | 127.0.0.1 | 1143 | 127.0.0.1 | 1025 |
| Self-hosted | your-server.com | 993 | your-server.com | 587 |
Using the email tool in agent chat
Section titled “Using the email tool in agent chat”Once configured, agents can read and send email directly:
Example prompt: “Check my inbox for any emails from team@company.com about the Q1 report”
Example prompt: “Send a summary of today’s completed tasks to manager@company.com”
Example prompt: “Reply to the most recent email from support@vendor.com asking for the invoice”
The agent uses the imap_read and smtp_send built-in tools internally.
Email-triggered scheduled jobs
Section titled “Email-triggered scheduled jobs”Create a scheduled job on the Schedule page that monitors your inbox. Click New Job and fill in:
| Field | Value |
|---|---|
| Name | Process support emails |
| Goal | Check inbox for new emails tagged [SUPPORT], triage them, create tasks, and reply with confirmation |
| Schedule | Interval: every 5 minutes |
| Delivery | Channel: Slack #support-ops |
The job runs every 5 minutes, reads new emails via IMAP, processes them, and delivers a summary to Slack.
Email as a delivery channel
Section titled “Email as a delivery channel”Scheduled jobs can deliver results via email. When creating a job on the Schedule page, set the delivery type to Email and configure the recipient, subject, and format.
Security considerations
Section titled “Security considerations”- Store credentials using app passwords, not your main account password
- Use SSL/TLS for all connections (port 993 for IMAP, 587+STARTTLS for SMTP)
- Create a dedicated email address for Snippbot (e.g.,
snippbot@yourcompany.com) for audit trail purposes - The email credentials are stored in
~/.snippbot/config.toml— restrict file permissions
Troubleshooting
Section titled “Troubleshooting”IMAP connection refused
Section titled “IMAP connection refused”- Verify IMAP is enabled for your account (Gmail: Settings → See all settings → Forwarding and POP/IMAP → Enable IMAP)
- Check firewall — port 993 must be outbound-open
- Verify hostname and port
Authentication failed
Section titled “Authentication failed”- Use an app password, not your account password
- For Gmail: 2FA must be enabled to generate app passwords
- Check the username is the full email address (some servers use just the local part)
Can’t send email (SMTP blocked)
Section titled “Can’t send email (SMTP blocked)”Some ISPs block outbound SMTP on port 25/587. In Settings → Profile → SMTP, change the port to 465 and enable SSL (instead of STARTTLS).