> For the complete documentation index, see [llms.txt](https://docs.resifactory.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.resifactory.net/imap/clients/refract.md).

# Refract

{% hint style="warning" %}

## The one thing to get right

In Refract, enter the IMAP server as:

```
mail.resifactory.net:993
```

**With the port, in the server field itself.** Refract does not append the port for you. Entering `mail.resifactory.net` on its own will not connect properly — and this is by far the most common reason a Refract setup fails.
{% endhint %}

## Settings

<figure><img src="/files/raDRRSoqkWzPAY6sNC0c" alt="Refract IMAP settings with the server field containing mail.resifactory.net:993"><figcaption></figcaption></figure>

| Field           | Value                                                                 |
| --------------- | --------------------------------------------------------------------- |
| **IMAP server** | `mail.resifactory.net:993`                                            |
| **Username**    | Your login email, e.g. `you@buyers.resifactory.net`                   |
| **Password**    | An [app password](/imap/app-passwords.md) — not your sign-in password |
| **SSL / TLS**   | On                                                                    |

## Step by step

1. **Create an app password** in the console: **App passwords → New**.
   * Label it `refract-desktop` (or whatever identifies this machine).
   * Scope: **Unified**.
   * Inbox window: **Last 24 hours** is a good default for Refract. Use **Last 7 days** if you also want it to catch order mail.
   * Copy the password — it is shown once.
2. **In Refract**, add the email account.
3. **IMAP server**: type `mail.resifactory.net:993`. Check it before moving on.
4. **Username**: your login email.
5. **Password**: paste the app password.
6. Save and let it connect.

## Checking it worked

Back in the console, **App passwords** should show a **Last used** time on the `refract-desktop` row within a few seconds of Refract connecting.

<figure><img src="/files/LV8IyKVGDoX9l8eMYgKw" alt="The app passwords list with last-used times"><figcaption></figcaption></figure>

If it still reads `–`, Refract never authenticated — go back and check the server string first.

## The failure to recognise

<figure><img src="/files/z8DAV4WWhd3F8x60j5bh" alt="The server field without the port, struck through"><figcaption><p>Missing <code>:993</code> — this is the one that catches people.</p></figcaption></figure>

Symptoms of the missing port:

* Refract hangs on "connecting" and eventually times out.
* A connection error that names no specific cause.
* Nothing at all appears in **Last used** in the console.

The fix is to add `:993` to the end of the server field. Nothing else needs to change.

## Getting the mailboxes into Refract

Refract reads the **unified inbox**, so it sees mail for every mailbox you own through the one connection — you do not add mailboxes to it one by one.

Each message carries its real recipient in the `To:` header, which is how Refract tells them apart.

If you also need the individual mailbox logins and passwords for something else, export them from **Accounts** — see [Exporting credentials](/credentials/exporting.md).

## Tuning

| Symptom                                         | Change                                                                                      |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Codes take too long to appear                   | Narrow the [inbox window](/imap/inbox-window.md) to **Last 1 hour** or **Last 15 minutes**. |
| Missing order confirmations from a few days ago | Widen the window to **Last 7 days** or **Last 14 days**.                                    |
| First sync is very slow                         | The window is too wide. Narrow it.                                                          |

## Other Refract notes

* **No outgoing server.** If Refract asks for SMTP settings, leave them blank. This server does not send mail.
* **One folder.** `INBOX` is all there is; there is no Sent or Junk to map.
* **Revoking access.** If you stop using this machine, revoke the `refract-desktop` app password. Its live connection drops immediately and nothing else you run is affected.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.resifactory.net/imap/clients/refract.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
