memcode docs
Agents

Email

Email your memcode agent, from any mailbox including your own.

Memcode watches a mailbox and answers the senders you allow. Point it at your own inbox or give the agent its own address. It only acts on mail from allowed senders and touches nothing else: no mail is marked read, moved, or changed, and mail already in the mailbox when you connect is never read or answered.

Step 1: Pick the mailbox

Any account with IMAP and SMTP access works; Gmail and Outlook both do.

Your own inbox is the fastest start: allow your other addresses and email tasks to yourself. Replies come from your address, since the agent sends as the mailbox it watches.

A separate address for the agent, like mybot@gmail.com, gives it its own identity: replies come from the bot, and anyone you allow can write to it.

Step 2: Make an app password

Regular passwords do not work for mailbox access; you need an app password.

For Gmail, turn on 2-Step Verification for the account, then create one at myaccount.google.com/apppasswords. Google shows the 16-character password once. Copy it.

Outlook and other providers have a similar option under account security settings.

Step 3: Configure

memcode gateway setup

Choose email and enter the address, the app password, the IMAP host (imap.gmail.com for Gmail), and the SMTP host (smtp.gmail.com). When prompted for allowed senders, enter the addresses that may drive the agent.

Step 4: Run

memcode gateway

then email the watched address from an allowed sender. The task is the email body. The answer comes back as a reply, and further replies thread into the same conversation, so a back-and-forth over email behaves like a chat.

What you can send

Images and PDFs attached to your email are part of the task. A voice memo is transcribed and treated as the task, so you can dictate work from your phone's mail app.

The mailbox is checked about every 15 seconds; set email.poll under the channel in gateway.yaml to change the cadence. Automated mail like newsletters, receipts, and no-reply senders never triggers jobs.

Mail from everyone else

Left exactly as it arrived: not answered, not marked, not touched. On the chat channels an unknown sender gets a pairing code to request access; over email that is off by default, so a personal inbox never auto-replies to strangers. For a dedicated bot address, turn it on in gateway.yaml:

channels:
  email:
    pairing: true

A note on sender identity

Email is the one channel where "who sent this" comes from the message itself rather than a platform account. Your mail provider's spam and authentication checks keep pretenders out, so use a mainstream provider. For anything sensitive, prefer a channel with platform accounts, like Telegram or Slack.

On this page