ConnectOnionConnectOnion
DocsAgent Emails

Agent Emails

New

Send and receive emails with simple functions. No config, no complexity.

Quick Start

quickstart.py
1from connectonion import send_email, get_emails 2 3# Send an email 4send_email("alice@example.com", "Hello!", "Welcome to our platform") 5 6# Read your emails 7emails = get_emails(unread=True) 8for email in emails: 9 print(f"{email['from']}: {email['subject']}")

Two Capabilities

All Functions

functions.py
1# Sending (via OpenOnion - zero config) 2send_email(to, subject, message) # Send an email 3 4# Receiving (via IMAP - any provider) 5get_emails(last=10, unread=False) # Get emails from inbox 6mark_read(email_id) # Mark as read 7mark_unread(email_id) # Mark as unread

Agent Emails vs Gmail

Agent Emails (This page)

  • Simple functions: send_email, get_emails
  • Works with any email provider (IMAP)
  • Zero config for sending (OpenOnion)
  • Best for simple automation

Gmail (OAuth)

  • Full Gmail class with 15+ methods
  • Labels, archive, star, trash
  • Advanced search & CRM features
  • Best for Gmail power users

Need more features? Check out Gmail for full inbox management.