Any Email (IMAP + SMTP) MCP Server

Wiki / Tools

Any Email (IMAP + SMTP) MCP Server

The Any Email server connects DMJBot to any standard mailbox over IMAP (read) and SMTP (send) — Outlook, Fastmail, a company mail server, or any other IMAP/SMTP provider. DMJBot can list the inbox, read messages and attachments, send mail, and mark messages read. For a Gmail account, the dedicated Gmail server is simpler (no server settings to enter).

What DMJBot can do

  • send_email — send an email via SMTP. Recipients may be contact names or addresses.
  • get_inbox — list messages in the inbox.
  • get_email_contents — fetch the body and headers of a specific email.
  • mark_email_read — mark an email as read.
  • get_attachment — download an attachment from an email.

Notification

  • new_email — a new message is detected in the inbox during polling (id, from, subject, date).

Before you start

Get the IMAP and SMTP settings from your email provider:

  • IMAP hostname and port (993 for TLS).
  • SMTP hostname and port (587 for STARTTLS, 465 for TLS).
  • Your login (usually the full email address) and password — many providers require an app-specific password rather than your normal one.

Add the server

The Any Email server is bundled in the DMJBot catalog. Add it either in DMJBot itself or on a connected device:

  • In DMJBot: Settings -> Tools, add the Any Email server from the catalog, and fill in the configuration fields below.

  • On a device (bridge):

    dmjbot-bridge install any-email
    dmjbot-bridge configure any-email
    dmjbot-bridge start
    

You can run more than one mailbox — give each a distinct Email Box Title so DMJBot can tell them apart.

Configuration

Field Required Default Description
My Email Address yes Your own address (used as the sender).
Email Username yes Login for IMAP and SMTP (usually the full address).
Email Password yes Password or app-specific password for IMAP and SMTP. Sensitive.
IMAP Server yes IMAP hostname (e.g. imap.fastmail.com).
IMAP Port no 993 IMAP port; 993 for TLS.
IMAP Use TLS no true Connect to IMAP over TLS.
SMTP Server yes SMTP hostname (e.g. smtp.fastmail.com).
SMTP Port no 587 SMTP port; 587 for STARTTLS, 465 for TLS.
SMTP Require TLS no true Require STARTTLS/TLS for SMTP.
Contacts no (empty) Semicolon-separated name=email pairs (e.g. Alice=alice@example.com;Bob=bob@example.com) so tools can resolve names to addresses.
Email Box Title no My emailbox Short label included in tool descriptions so DMJBot can pick the right mailbox when several are loaded.
Monitor New Emails no true Poll the inbox and emit new_email notifications.
Notification Interval (s) no 30 How often the inbox is polled (ignored when monitoring is off).

Boolean fields accept true/false, 1/0, t/f.

See also