c

cortex-plugin-email

ESM
v1.0.0MIT

Official CortexPrism plugin

0.00CortexPrism
cortex-plugincortexprismdenoplugin

Install Command

$ cortex plugins install marketplace:cortexprism.io/plugins/cortex-plugin-email
Website RepositoryLicense: MITEntry: mod.ts

Configuration

Plugin Type
ESM
Entry Point
mod.ts
License
MIT

Capabilities

toolsnetwork:fetch

Tags

communicationcortex-plugindevelopmentesmmessagingnotifications

Statistics

Downloads
0
Rating
0.0
/ 5.0
Version
v1.0.0
Published
June 15, 2026

Reviews (0)

No reviews yet. Be the first to rate this plugin!

README

CortexPrism Email Plugin

Generic email integration for Cortex agents — send via SMTP, read via IMAP. Works with Gmail, Outlook, Yahoo, ProtonMail (Bridge), and any other email provider that supports SMTP/IMAP.

Note: Gmail-specific mail, calendar, drive, and docs tools are available in cortex-plugin-google. This plugin focuses on generic email connectivity via standard protocols.

Features

ToolDescriptionProtocol
email_listList emails from any IMAP mailboxIMAP
email_getGet a specific email by UID with full headers and bodyIMAP
email_sendSend email via any SMTP serverSMTP
email_draftCreate a draft email (RFC 2822 preview, no send)
email_summarize_threadSummarize an email thread by subject searchIMAP
email_extract_actionsExtract action items from email bodiesIMAP

Installation

# From marketplace
cortex plugin install marketplace:cortex-plugin-email

# From GitHub
cortex plugin install github:CortexPrism/cortex-plugin-email

# Local installation (for development)
cortex plugin install ./manifest.json

Configuration

Configure your SMTP and IMAP credentials in Cortex settings:

{
  "plugins": {
    "cortex-plugin-email": {
      "enabled": true,
      "config": {
        "smtpHost": "smtp.gmail.com",
        "smtpPort": 587,
        "smtpUser": "your.email@gmail.com",
        "smtpPassword": "your-app-password",
        "imapHost": "imap.gmail.com",
        "imapPort": 993,
        "imapUser": "your.email@gmail.com",
        "imapPassword": "your-app-password",
        "fromEmail": "your.email@gmail.com"
      }
    }
  }
}

Provider Quick Reference

ProviderSMTP HostSMTP PortIMAP HostIMAP Port
Gmailsmtp.gmail.com587 (STARTTLS)imap.gmail.com993 (TLS)
Outlook / Hotmailsmtp-mail.outlook.com587 (STARTTLS)outlook.office365.com993 (TLS)
Yahoo Mailsmtp.mail.yahoo.com587 (STARTTLS)imap.mail.yahoo.com993 (TLS)
ProtonMail Bridge127.0.0.11025127.0.0.11143
iCloud Mailsmtp.mail.me.com587 (STARTTLS)imap.mail.me.com993 (TLS)

App Passwords: Most providers require an app-specific password instead of your regular password. Check your provider's security settings.

Quick Start

# List your inbox
cortex tool call email_list '{"max_results": 5}'

# Search for emails
cortex tool call email_list '{"query": "meeting", "max_results": 10}'

# Send an email
cortex tool call email_send '{
  "to": "colleague@company.com",
  "subject": "Meeting tomorrow",
  "body": "Hi, just confirming our 10am meeting."
}'

# Create a draft (preview before sending)
cortex tool call email_draft '{
  "to": "boss@company.com",
  "subject": "Weekly report",
  "body": "Here is this week's update..."
}'

# Use in chat
cortex chat --plugin cortex-plugin-email

Tools

email_list

List emails from an IMAP mailbox.

Parameters:

  • max_results (number, optional, default: 20) — Maximum emails to return
  • query (string, optional) — Search query (searches subject and from fields)
  • mailbox (string, optional) — IMAP folder name (default: INBOX)

email_get

Get a specific email by its IMAP UID.

Parameters:

  • email_id (string, required) — Email UID to retrieve
  • format (enum, optional) — full, metadata, or minimal (default: full)
  • mailbox (string, optional) — IMAP folder name (default: INBOX)

email_send

Send an email via SMTP.

Parameters:

  • to (string, required) — Recipient(s), comma-separated
  • subject (string, required) — Email subject
  • body (string, required) — Email body (plain text or HTML)
  • cc (string, optional) — CC recipients, comma-separated
  • bcc (string, optional) — BCC recipients, comma-separated
  • is_html (boolean, optional, default: false) — Set true if body is HTML

email_draft

Create a draft email preview (does not send). Returns the RFC 2822 formatted message for review.

Parameters:

  • to (string, required) — Recipient(s)
  • subject (string, required) — Email subject
  • body (string, required) — Email body
  • cc (string, optional) — CC recipients
  • is_html (boolean, optional, default: false) — Whether body is HTML

email_summarize_thread

Summarize an email thread by searching for related messages.

Parameters:

  • thread_id (string, required) — Thread identifier (Message-ID or search term)
  • mailbox (string, optional) — IMAP folder name (default: INBOX)

email_extract_actions

Extract action items from email bodies using content analysis.

Parameters:

  • email_ids (string, required) — Comma-separated email UIDs to analyze
  • mailbox (string, optional) — IMAP folder name (default: INBOX)

Requirements

  • SMTP credentials for sending emails
  • IMAP credentials for reading/searching emails
  • Network access to your email provider's servers
  • For Gmail: enable "Less secure app access" or use an App Password

Development

# Run tests
deno task test

# Format code
deno fmt

# Lint
deno lint

# Validate
deno task validate

Project Structure

cortex-plugin-email/
├── manifest.json     # Plugin manifest with 6 tool definitions
├── mod.ts           # Main entry — email tools (list, get, send, draft, summarize, extract)
├── smtp.ts          # SMTP client — send email via TLS/STARTTLS with AUTH LOGIN
├── imap.ts          # IMAP client — list, search, fetch emails via TLS
├── types.ts         # TypeScript type definitions
├── test/            # Unit tests
├── README.md        # This file
└── CHANGELOG.md     # Version history

License

MIT

Support

Published June 15, 2026 · Updated June 15, 2026