---
title: Contacts and forwarding by e-mail
nav: Contacts
summary: The Agent remembers everyone it mailed for you and imports Google, Outlook, Apple, QQ and 163 contact exports in one go. Say “send it to Zhang San” and it finds the person by pinyin and sound-alikes. Forward any reply or file to e-mail in one tap, only to the addresses you pick. The address book stays on your computer.
order: 31
---
# Contacts and forwarding by e-mail

With the [e-mail channel](/docs/email/) set up, Agent J can send mail for you. This page covers the phone's "Forward by
e-mail" button, the address book the Agent keeps for you, and which files the Agent can take and give.

## Forward by e-mail

The row of icons at the bottom of a reply card (right after Forward to Telegram) and every file card have an envelope
icon. Tap it and a dialog opens:

- **To me** (the default): the main e-mail in slot 0 of your address book; until you fill that in, the address marked as yourself in Settings → E-mail channel.
- **To someone else**: pick one or more people from your contacts. Picking someone unticks "To me".
  - Sort by **Recent** (last sent first), **Most used** (most mails first) or **A–Z** (Chinese names by pinyin).
  - Search by name, nickname, pinyin (initials and sound-alikes included) or address.
  - Not there? Tap **New contact**, enter their address and a nickname; they are saved and selected.

Forwarding a reply sends the whole exchange: on top **You asked** — your message, the remote you sent it from, when, and
what it quoted — and below **Agent J answered**, with tables, code and lists laid out as on the phone, readable in light
and dark mail apps. The subject is "[Agent J] " and the first 40 characters of your message. Tick **Leave out my
message** to send the reply alone. The reply's files go along as attachments (20 MB per mail at most); the ones that do
not fit are listed in the mail as "Too big, not attached". Forwarding a file sends just that file. When it is done, the
same dialog says where it went (each address) and, for every file left out, why — its size against the limit, or that it
looks like it holds a key (such a file goes only to your own address). If sending failed you see the reason and
**Retry**; sending the same thing to the same people again within ten minutes asks first. The mail goes out from your own mailbox, **only to the addresses ticked in the dialog**. Every
address is then remembered in your contacts with how often and how recently you mailed it.

With no mailbox set up yet, the dialog takes you to Settings → E-mail channel.

## “Send this to Zhang San”

When you ask the Agent to mail someone, it:

1. Looks them up. Voice transcripts often get Chinese characters wrong, so it matches by sound: 张珊 finds 张三, “niu neng”
   finds 刘能, “zs” finds 张三, and surnames with special readings (单, 曾, 解 …) are handled. Latin names tolerate a typo
   (Jon → John).
2. Uses the one clear match; with several people of the same name, it asks which one.
3. Finds nobody? It tells you plainly (“No one called Zhang San in your contacts”) and puts a **contact card** on your
   phone with what you already said filled in. Add the address (or phone) and tap Save.
4. Mail to yourself, or to people who are all on the [e-mail allowlist](/docs/email/), goes straight out — no card.
   With anyone else among the recipients, an approval card on the phone lists recipients, subject and attachments, and
   nothing goes out until you hold to approve — the Agent cannot skip this. Each new recipient on the card has an
   unticked box “Don't ask again for mail to them (add to the allowlist)”; tick it and approve, and next time mail to
   them goes without a card. Attachments are checked for keys either way; a key in a file stops the mail.

Addresses the Agent mailed are remembered automatically, marked as added by the Agent.

### Formatted mail, Cc and reports

Mail from the Agent is formatted by default: the body's Markdown becomes headings, lists, tables and code blocks in the
same style as “Forward by e-mail”, with “Powered by Agent J” at the foot, plus a plain-text copy for mail apps that do not
show HTML.

- **Cc and Bcc**: say “cc Mr Wang” or “bcc finance” — written like recipients, by name, nickname or pinyin. The approval
  rule counts every recipient: one person on Cc or Bcc who is not on the allowlist brings the approval card; To, Cc and
  Bcc together take 10 addresses at most. Bcc recipients are hidden from the others.
- **A web report as the mail itself**: a web page report, or an HTML report a workflow made, can go as the whole mail
  body. Scripts, forms and embedded frames are taken out first and the styles are written into every element, so Gmail
  and Outlook keep the look; local images the report points to cannot travel in a mail and become their captions — add
  the report's link for the full version.
- **Scheduled mail**: when a scheduled task mails a daily or weekly report to you or to allowlisted people only, it goes
  at the set time without asking each time; anyone off the allowlist still needs your OK on the phone every time — that
  never loosens.
- Want plain text only? Tell the Agent “send it as plain text”.

## Slot 0: you

The first place in the address book is always you: your name, your main e-mail and, if you like, your phone number. Whenever you say "send it to me" — a web report, meeting minutes, a mail — it goes to that main e-mail.

- After your first remote is paired and the Agent has said hello, a "Your contact details" card rises on the phone. If the e-mail channel already lists your address, it is filled in for you to confirm. You can skip it and add it later in Settings → My contact details.
- Only you change slot 0: tap Save on the phone, or run `agentj contacts owner set` in your own terminal. The Agent cannot write it; it can only put the card in front of you. `agentj contacts owner show` shows it.
- Mail to that address counts as mail to yourself: e-mail addresses, phone numbers, links and access codes go as written (see [Privacy](/docs/privacy/)). It counts only when every recipient is you; one other recipient and the whole mail is redacted as usual. Credentials such as API keys and passwords never ride in the mail: they come as a secret pickup card on your phone.

## Manage the address book on the phone

Open Settings and tap "Contacts" under Channels to look after your friends' details yourself, without asking the Agent:

- The search box at the top finds people by name, nickname, pinyin or address.
- The plus icon adds a contact; tap a row to open it and change the name, nicknames, e-mail and phone, or tap "Delete"
  (you are asked once more). The dialog edits the first e-mail and the first phone; any others stay as they are.
- The import icon takes a vCard, CSV or JSON file exported from a phone or a mail service (1 MB at most) and tells you how
  many were added, merged and skipped. The export icon downloads the whole address book as one vCard file.
- A contact with an e-mail has an envelope icon on the right: one tap puts that address on the
  [e-mail channel](/docs/email/)'s allowlist as a guest — their mail reaches the Agent but never counts as your
  instruction. An address already on the list shows a tick on its envelope.
- The first row is you (slot 0): it opens "My contact details" and cannot be deleted; its envelope adds your address as
  yourself (Me).

The address book stays on the computer; the phone only reads it while this page is open. Deleting a contact does not take
the address off the e-mail allowlist.

## The contact card

When the Agent wants to save a new contact or complete one (“Mr Li has a second mobile”), the phone shows a contact card:

- Name, nicknames, e-mails, phones, addresses, company and note are all editable; e-mails, phones and addresses can repeat.
- When completing a contact, what the Agent added is marked in green.
- **Saving needs at least one e-mail or phone.** "Don't save" or Esc saves nothing.

## The address book

Each contact holds a name, nicknames, e-mails (with labels such as work / home), phones, addresses, company, title,
birthday and a note, plus when you last mailed them and how often. The fields follow vCard 4.0 and the Google and
Outlook CSV exports.

**Import:** send the Agent an export and ask it to import your contacts, or tap the import icon in Settings → Contacts
and pick the file yourself:

| From | File |
|---|---|
| Apple Contacts / iCloud, Android | `.vcf` (vCard 2.1 / 3.0 / 4.0) |
| Google Contacts | `.csv` (old and new layout) or `.vcf` |
| Outlook / Outlook.com | `.csv` |
| QQ Mail, 163, Foxmail, business mail | `.csv` (UTF-8 or GBK) or `.vcf` |
| Anything else | `.json` (items with name, email, phone) |

The Agent does a dry run first and tells you how many are new, merged and skipped. **The same e-mail or phone number is the
same person** and is merged; two people with the same name and different addresses stay two contacts.

**Export:** ask the Agent to export your contacts. You get a `.vcf` (vCard 3.0, which every phone and mail app imports) or
a `.csv` (Google layout) as a file card on the phone. The export icon in Settings → Contacts downloads the `.vcf` directly.

Commands (the Agent runs them for you):

```
agentj contacts find 张珊
agentj contacts list --sort recent|frequent|name
agentj contacts import contacts.csv --dry-run
agentj contacts export contacts.vcf
agentj contacts card --name 'Zhang San' --why 'owner wants to mail Zhang San'
agentj mail send --to 'Zhang San' --subject 'Weekly report' --body-file - --attach report.pdf
agentj mail send --to-owner --cc 'Wang' --subject 'Daily report' --body-file daily.md
agentj mail send --to 'Zhang San' --subject 'Meeting notes' --body-file report/index.html
```

## Privacy

- The address book lives only on your computer (in Agent J's data folder, readable by you alone): never in the cloud,
  never through the relay.
- The phone reads it over the same end-to-end encrypted channel as your chat.
- Logs record counts and results, never an address, a name or a mail's content.
- Search uses a plain table with a pinyin index. We looked at a vector database: an address book holds a few hundred names
  and the question is how a name sounds, which embeddings do not capture — so no extra model is installed.

## Files the Agent can take and give

**To the Agent:** the phone's File button, Telegram private chat and e-mail attachments take any file. The Agent reads and
works with these formats directly:

| Kind | Formats |
|---|---|
| Images | jpg, png, webp, gif, heic, svg |
| Documents | pdf, txt, md, docx, xlsx, pptx, doc, xls, ppt, odt, ods, odp, rtf, epub, html |
| Data | csv, tsv, json, jsonl, xml, yaml, toml |
| Contacts, calendars, mail | vcf, ics, eml, mbox |
| Archives | zip, gz, tgz, tar, 7z |
| Audio and video | mp3, m4a, aac, ogg, opus, wav, mp4, mov, webm (transcribed on your computer when sent) |

**From the Agent:** file cards in a reply support every format above except heic; you can download, share or forward them
by e-mail. They come only from the Agent's own working folder, and text files are checked for keys first — a file with
one is not sent.
