forwardemail 0.14.20 → 0.14.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,6 +17,7 @@ forwardemail
17
17
  - [Commands and options](#commands-and-options)
18
18
  - [Keys and mouse](#keys-and-mouse)
19
19
  - [Plain text](#plain-text)
20
+ - [Attachments](#attachments)
20
21
  - [Notifications](#notifications)
21
22
  - [Environment variables](#environment-variables)
22
23
  - [Where data is stored](#where-data-is-stored)
@@ -142,15 +143,18 @@ What you type right after a new-message, reply or forward shortcut (Ctrl+N, `r`,
142
143
 
143
144
  | Key | Action |
144
145
  | :------------------ | :------------------------------------------------------------------------------- |
145
- | `Tab` / `Shift+Tab` | Move between controls. The focused control is highlighted. |
146
+ | `Tab` / `Shift+Tab` | Move between controls, starting from where you clicked. Focus is highlighted. |
146
147
  | `Enter` / `Space` | Activate the focused button or link. |
147
- | `↑` / `↓` | Move through the message list. |
148
+ | `↑` / `↓` | Open the next or previous message, counting from the focused row in the list. |
148
149
  | `Esc` | Close a dialog or menu; otherwise go back (from a message, a contact, settings). |
149
150
  | `Ctrl+N` | Compose a new message. |
151
+ | `Ctrl+O` | Attach a file to the message you are writing (see [Attachments](#attachments)). |
150
152
  | `r` / `a` / `f` | Reply, reply all, forward. |
151
153
  | `e` / `s` / `Del` | Archive, star, delete. |
152
154
  | `?` | Show every keyboard shortcut. |
153
- | `Ctrl+C` | Quit and give the terminal back. |
155
+ | `Ctrl+C` | Copy the selected text; with nothing selected, quit (after asking). |
156
+
157
+ Opening a message moves the keyboard into it, so `Tab` goes through its buttons and addresses. Going back to the list puts the focus on that message's row.
154
158
 
155
159
  `forwardemail` uses the terminal's alternate screen, as `vim` and `less` do. The wheel scrolls the app, not your shell's history, and quitting puts your shell's screen back as it was.
156
160
 
@@ -158,7 +162,7 @@ A scroll bar on the right edge of the message list, a message, the compose windo
158
162
 
159
163
  Clicking and scrolling with the wheel work with the mouse in any terminal that reports mouse events. That includes most modern terminals: iTerm2, Terminal.app, GNOME Terminal, Konsole, kitty, WezTerm, Alacritty, foot and Windows Terminal. A terminal of 120 columns or more shows the full desktop layout. At 80 columns or fewer (the webmail's 640 px phone breakpoint), the folder list moves behind the `≡` menu, as on a phone.
160
164
 
161
- Drag over text, in a message or anywhere else, to select it. Releasing the button copies it to your clipboard, and the bottom row says **Copied**. The copy goes through the terminal's clipboard sequence (OSC 52), so it also works over SSH. In tmux, add `set -g set-clipboard on`. iTerm2 asks first: allow it under **Settings › General › Selection › Applications in terminal may access clipboard**. To use your terminal's own selection instead, hold its modifier while you drag: Option in iTerm2, Fn in Terminal.app, Shift in most others.
165
+ Drag over text, in a message or anywhere else, to select it, then press `Ctrl+C` to copy it. The bottom row shows **Ctrl+C Copy** while text is selected. A click on an address in an open message copies the address. A copy goes to your clipboard two ways: through the system's clipboard program (`pbcopy` on macOS, PowerShell or `clip.exe` on Windows and in WSL, `wl-copy` under Wayland, `xclip` or `xsel` under X11), and through the terminal's clipboard sequence (OSC 52), the way that works over SSH. The app says **Copied** when the text got there. It says the copy failed when a clipboard program failed, or when none is installed and the terminal ignores OSC 52 (GNOME Terminal and the other VTE terminals, Terminal.app, the Linux console). On Linux, install `wl-clipboard` or `xclip` for copies in those terminals. Over SSH, the terminal has to accept OSC 52: in tmux, add `set -g set-clipboard on` (or `set -g allow-passthrough on`); iTerm2 asks first, allow it under **Settings › General › Selection › Applications in terminal may access clipboard**. To use your terminal's own selection instead, hold its modifier while you drag: Option in iTerm2, Fn in Terminal.app, Shift in most others.
162
166
 
163
167
  With the pointer on a button, the bottom row shows the button's name. Ghostty, kitty, WezTerm and foot also change the pointer to a hand over links and buttons and to an I-beam over text fields. `FORWARDEMAIL_POINTER=1` asks other terminals to do the same, and `FORWARDEMAIL_POINTER=0` stops it.
164
168
 
@@ -168,6 +172,30 @@ Links in messages, and links to other sites, open in your default browser. Files
168
172
 
169
173
  Messages are shown, and new messages written, as plain text by default in the terminal. A reply quotes the original with `>` in front of each line. The **T** button next to **Save draft** in the compose window switches that message to rich text, with the formatting toolbar, and back. To change the default, use **Settings › Appearance › Use plain text by default** and **Settings › Privacy & Security › View emails as plain text**. The browser, desktop and mobile apps keep rich text as their default.
170
174
 
175
+ ### Attachments
176
+
177
+ To attach files, choose **⌇** (Attach file) in the compose window or press `Ctrl+O`. The bottom row lists `Ctrl+O` where there is room; at 80 columns it leaves it out to keep `Ctrl+C Quit`. A file dialog opens:
178
+
179
+ | System | Dialog |
180
+ | :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------- |
181
+ | macOS | The system's Open dialog, through `osascript`. |
182
+ | Linux and BSD | `zenity` or `kdialog`, when there is a display. KDE desktops try `kdialog` first. Install either one (packages `zenity`, `kdialog`) to use it. |
183
+ | Windows | The system's Open dialog, through PowerShell. |
184
+ | WSL | The Windows Open dialog, through PowerShell; the files come back as `/mnt/c/…` paths. With WSLg, `zenity` or `kdialog` is the fallback. |
185
+
186
+ Over SSH, and on Linux without a display, the bottom row asks for the file's path instead:
187
+
188
+ ```text
189
+ File to attach: ~/Documents/rep
190
+ Tab Complete Enter Attach Esc Cancel
191
+ ```
192
+
193
+ Tab completes a name as a shell does and lists the names when several match. A relative path starts in the directory you ran `forwardemail` from. Enter attaches the file. Esc, or a click elsewhere, cancels. Over SSH with X forwarding (`ssh -X`), Linux uses the dialog on your display. `FORWARDEMAIL_FILE_PICKER=terminal` always asks on the bottom row. While a dialog is open, Esc in the terminal closes it.
194
+
195
+ You can also drag files from your file manager and drop them on the terminal window while the compose window is open. A terminal turns a drop into the files' paths, pasted as text. The client reads those paths and attaches the files in place of the text. It understands the ways terminals write them: backslash escapes (macOS Terminal, iTerm2, Ghostty), quotes (GNOME Terminal, WezTerm, Windows Terminal), `file://` links with `%20` for spaces, a path per line, and Windows paths under WSL. A paste in the To, Cc, Bcc or Subject field stays text, and so does a pasted path to a file that does not exist. To put the path of an existing file into the message, type it. The terminal has to mark the drop as a paste (bracketed paste), as current terminals do; a terminal that types the path out instead puts it into the message as text.
196
+
197
+ The client skips folders, and files that would take the message's attachments past 37.5 MB, counting the ones already on it: the server takes messages up to 50 MB, and encoding makes attachments a third larger. Removing an attachment makes room again. The bottom row says what the client attached and what it skipped. Each attachment shows below the message with its size, and its **✕** removes it.
198
+
171
199
  ### Notifications
172
200
 
173
201
  New mail that arrives while the terminal is in the background shows as a desktop notification, as it does in a browser tab you are not looking at. While you are using the terminal, it shows inside the app instead. Calendar reminders work the same way.
@@ -186,16 +214,17 @@ Notifications are off over SSH, since they would appear on the remote computer,
186
214
 
187
215
  ### Environment variables
188
216
 
189
- | Variable | Effect |
190
- | :----------------------------- | :----------------------------------------------------------------------------------- |
191
- | `FORWARDEMAIL_HOME` | Same as `--data-dir`: the directory for settings and the session (see below). |
192
- | `FORWARDEMAIL_API_URL` | Same as `--api`. |
193
- | `FORWARDEMAIL_NO_UPDATE_CHECK` | Same as `--no-update-check`. |
194
- | `FORWARDEMAIL_NO_HINTS` | Same as `--no-hints`. |
195
- | `FORWARDEMAIL_NOTIFICATIONS` | `0` is the same as `--no-notifications`. `1` shows them over SSH too. |
196
- | `FORWARDEMAIL_POINTER` | `1` asks any terminal to change the pointer shape, `0` none (see above). |
197
- | `FORWARDEMAIL_DOWNLOADS` | Where saved files go, instead of `~/Downloads` (or your home directory without one). |
198
- | `FORWARDEMAIL_DEBUG` | Writes the app's console output to `forwardemail.log` in the data directory. |
217
+ | Variable | Effect |
218
+ | :----------------------------- | :------------------------------------------------------------------------------------ |
219
+ | `FORWARDEMAIL_HOME` | Same as `--data-dir`: the directory for settings and the session (see below). |
220
+ | `FORWARDEMAIL_API_URL` | Same as `--api`. |
221
+ | `FORWARDEMAIL_NO_UPDATE_CHECK` | Same as `--no-update-check`. |
222
+ | `FORWARDEMAIL_NO_HINTS` | Same as `--no-hints`. |
223
+ | `FORWARDEMAIL_NOTIFICATIONS` | `0` is the same as `--no-notifications`. `1` shows them over SSH too. |
224
+ | `FORWARDEMAIL_POINTER` | `1` asks any terminal to change the pointer shape, `0` none (see above). |
225
+ | `FORWARDEMAIL_DOWNLOADS` | Where saved files go, instead of `~/Downloads` (or your home directory without one). |
226
+ | `FORWARDEMAIL_FILE_PICKER` | `terminal` asks for a file's path on the bottom row instead of opening a file dialog. |
227
+ | `FORWARDEMAIL_DEBUG` | Writes the app's console output to `forwardemail.log` in the data directory. |
199
228
 
200
229
  ### Where data is stored
201
230
 
@@ -290,6 +319,7 @@ The terminal client runs the webmail's own code, so features behave the same way
290
319
  - **Fonts and font sizes** are the terminal's. Headings stand out by weight and color, not size.
291
320
  - **Passkeys** (WebAuthn) need a browser or the desktop app. To use App Lock in the terminal, unlock it with its PIN.
292
321
  - **Push notifications and the service worker** are unavailable. New mail arrives over the WebSocket connection while the app is open, and shows as a [desktop notification](#notifications) when the terminal is in the background.
322
+ - **Drag and drop** reaches the terminal as pasted file paths, which the compose window turns into attachments (see [Attachments](#attachments)).
293
323
  - **Hover tooltips** appear in the bottom row rather than over the page, where they would cover the controls around them.
294
324
  - **Transparency and animation** are flattened: translucent colors are blended with the page background, and transitions jump to their end.
295
325
  - **Esc followed by a key** in quick succession counts as two presses, not as Alt plus the key (some terminals send Alt that way). The exceptions are Alt+Backspace and Alt+B/F/D, which keep their word-editing meaning in text fields. The webmail has no other Alt shortcuts.
@@ -326,9 +356,10 @@ The webmail is built a second time for Node.js, and the result is a single Commo
326
356
  - `history` and `location` ([`src/cli/history.ts`](../src/cli/history.ts))
327
357
  - sandboxed message frames ([`src/cli/frames.ts`](../src/cli/frames.ts))
328
358
  - downloads and outside links ([`src/cli/links.ts`](../src/cli/links.ts))
359
+ - file inputs, file dialogs and dropped files ([`src/cli/attachments.ts`](../src/cli/attachments.ts)), and `FileReader` ([`src/cli/file-reader.ts`](../src/cli/file-reader.ts))
329
360
  - geometry scaled to the virtual pixel grid ([`src/cli/viewport.ts`](../src/cli/viewport.ts))
330
361
 
331
- The application code under `src/` is untouched. Everything specific to the terminal lives in `src/cli/`, and the browser and desktop builds do not include it.
362
+ The application code under `src/` runs as it is; the one addition for the terminal is the compose window's `data-attachment-bytes` attribute, which the attachment size limit reads. Everything specific to the terminal lives in `src/cli/`, and the browser and desktop builds do not include it.
332
363
 
333
364
  The standalone executables are [Node.js single executable applications](https://nodejs.org/api/single-executable-applications.html): the bundle is injected into a copy of the `node` binary by [`scripts/build-sea.mjs`](../scripts/build-sea.mjs).
334
365