Skip to content

Email for professionals and teams

Make the read-receipt default an account setting

Kevin Kyburz8326b9d1bd2d
diff --git a/CLAUDE.md b/CLAUDE.md
index bad6282..1136d6d 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -103,6 +103,8 @@ The app reaches every platform service through `getEnv()` (`src/lib/cloudflare.t
`handleJmapRequest` (`src/lib/jmap/handler.ts`) owns `/jmap/*` and `/.well-known/jmap`; the Next routes under `src/app/jmap/[[...segments]]` and `src/app/.well-known/jmap` only delegate to it, and it is framework-free so it could be mounted from `worker.ts` too. Auth is an API key with the `jmap` scope via `authenticateApiRequest` (`src/lib/api/key-auth.ts`, the Next-free core that `src/lib/api/auth.ts` now wraps). JMAP Mailbox ids encode `mailboxId`, `mailboxId~role` or `mailboxId~f~folderId` (`ids.ts`); `email-query.ts` maps filters onto `messages` columns, `email-objects.ts` builds Email objects from stored rows (no MIME parsing).
+`processRequest` memoizes the accessible mailboxes and the change scope on `ctx.memo` across read-only calls of one request; write methods run with `memo: null` because they read `oldState` and `newState` in the same call.
+
States are positions in a change log (`changes.ts`): the `jmap_changes_*` triggers of migration 0064 write a row per created, updated or destroyed message and per folder or mailbox change into `jmap_changes`, so `Email/changes`, `Mailbox/changes` and `Thread/changes` return real deltas (`Email/queryChanges` still answers `cannotCalculateChanges`). A state is `c1:<seq>:<access fingerprint>`; a sharing change alters the fingerprint, and the daily cron prunes rows older than 30 days and raises `jmap_change_floor`, and either makes older states answer `cannotCalculateChanges`. Like `jmap_mailbox_revisions`, these tables are derived and excluded from backups. Never write to them from application code.
### Mobile apps: device keys and native push
diff --git a/drizzle/migrations/0072_add_user_compose_preferences.sql b/drizzle/migrations/0072_add_user_compose_preferences.sql
new file mode 100644
index 0000000..e11848c
--- /dev/null
+++ b/drizzle/migrations/0072_add_user_compose_preferences.sql
@@ -0,0 +1,6 @@
+CREATE TABLE `user_compose_preferences` (
+ `user_id` text PRIMARY KEY NOT NULL,
+ `track_opens_default` integer DEFAULT false NOT NULL,
+ `updated_at` integer NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
diff --git a/drizzle/migrations/meta/_journal.json b/drizzle/migrations/meta/_journal.json
index b405ba0..e525c94 100644
--- a/drizzle/migrations/meta/_journal.json
+++ b/drizzle/migrations/meta/_journal.json
@@ -442,6 +442,13 @@
"when": 1792837200000,
"tag": "0071_add_follow_ups",
"breakpoints": true
+ },
+ {
+ "idx": 64,
+ "version": "6",
+ "when": 1792840800000,
+ "tag": "0072_add_user_compose_preferences",
+ "breakpoints": true
}
]
}
diff --git a/public/locales/ar.json b/public/locales/ar.json
index 736bb81..4e59ebd 100644
--- a/public/locales/ar.json
+++ b/public/locales/ar.json
@@ -756,6 +756,12 @@
"settingsPage.inbox.threadingDescription": "اختر كيف تُنظَّم الرسائل في صندوق واردك.",
"settingsPage.inbox.addresses": "العناوين",
"settingsPage.inbox.addressesDescription": "اختر كيف تظهر عناوين المستلمين عند قراءة البريد.",
+ "settingsPage.inbox.compose": "الكتابة",
+ "settingsPage.inbox.composeDescription": "الإعدادات الافتراضية للرسائل الجديدة. يمكن لكل رسالة تغييرها في المحرر.",
+ "settings.compose.trackOpensTitle": "إيصالات القراءة مفعّلة افتراضيًا",
+ "settings.compose.trackOpensDescription": "تبدأ الرسائل الجديدة والعين مفعّلة. قد تحظر تطبيقات المستلمين الصورة مع ذلك.",
+ "settings.compose.failed": "تعذّر حفظ إعدادات الكتابة.",
+ "settings.compose.migrationRequired": "شغّل أولًا «تحديث قاعدة البيانات» في الإدارة.",
"settingsPage.inbox.shortcuts": "الاختصارات",
"settingsPage.inbox.shortcutsDescription": "اختر ما إذا كانت اختصارات لوحة المفاتيح مفعّلة.",
"settingsPage.inbox.notifications": "الإشعارات",
diff --git a/public/locales/bn.json b/public/locales/bn.json
index 83ce610..a8138de 100644
--- a/public/locales/bn.json
+++ b/public/locales/bn.json
@@ -730,6 +730,12 @@
"settingsPage.inbox.threadingDescription": "আপনার ইনবক্সে ইমেইল কীভাবে সাজানো হবে তা বেছে নিন।",
"settingsPage.inbox.addresses": "ঠিকানা",
"settingsPage.inbox.addressesDescription": "মেইল পড়ার সময় প্রাপকদের ঠিকানা কীভাবে দেখাবে তা বেছে নিন।",
+ "settingsPage.inbox.compose": "লেখা",
+ "settingsPage.inbox.composeDescription": "নতুন বার্তার ডিফল্ট। প্রতিটি বার্তা এডিটরে এগুলো বদলাতে পারে।",
+ "settings.compose.trackOpensTitle": "পড়ার রসিদ ডিফল্টভাবে চালু",
+ "settings.compose.trackOpensDescription": "নতুন বার্তা চোখ চালু অবস্থায় শুরু হয়। প্রাপকদের অ্যাপ তবুও ছবি আটকাতে পারে।",
+ "settings.compose.failed": "লেখার সেটিংস সংরক্ষণ করা যায়নি।",
+ "settings.compose.migrationRequired": "প্রথমে অ্যাডমিনে “ডেটাবেস আপডেট করুন” চালান।",
"settingsPage.inbox.shortcuts": "শর্টকাট",
"settingsPage.inbox.shortcutsDescription": "কীবোর্ড শর্টকাট সক্রিয় থাকবে কি না তা বেছে নিন।",
"settingsPage.inbox.notifications": "বিজ্ঞপ্তি",
diff --git a/public/locales/de.json b/public/locales/de.json
index b630ddf..0d09309 100644
--- a/public/locales/de.json
+++ b/public/locales/de.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "Wählen Sie, wie E-Mails in Ihrem Posteingang organisiert werden.",
"settingsPage.inbox.addresses": "Adressen",
"settingsPage.inbox.addressesDescription": "Wählen Sie, wie Empfängeradressen beim Lesen von E-Mails angezeigt werden.",
+ "settingsPage.inbox.compose": "Verfassen",
+ "settingsPage.inbox.composeDescription": "Standards für neue Nachrichten. Jede Nachricht kann sie im Editor trotzdem ändern.",
+ "settings.compose.trackOpensTitle": "Lesebestätigung standardmässig an",
+ "settings.compose.trackOpensDescription": "Neue Nachrichten starten mit eingeschaltetem Auge. Mail-Apps der Empfänger können das Bild trotzdem blockieren.",
+ "settings.compose.failed": "Die Einstellungen zum Verfassen konnten nicht gespeichert werden.",
+ "settings.compose.migrationRequired": "Führen Sie zuerst im Admin „Datenbank aktualisieren“ aus.",
"settingsPage.inbox.shortcuts": "Tastenkürzel",
"settingsPage.inbox.shortcutsDescription": "Wählen Sie, ob Tastaturkürzel aktiv sind.",
"settingsPage.inbox.notifications": "Benachrichtigungen",
diff --git a/public/locales/es.json b/public/locales/es.json
index ca13037..930f0c5 100644
--- a/public/locales/es.json
+++ b/public/locales/es.json
@@ -738,6 +738,12 @@
"settingsPage.inbox.threadingDescription": "Elige cómo se organizan los correos en tu bandeja de entrada.",
"settingsPage.inbox.addresses": "Direcciones",
"settingsPage.inbox.addressesDescription": "Elige cómo se muestran las direcciones de los destinatarios al leer el correo.",
+ "settingsPage.inbox.compose": "Redacción",
+ "settingsPage.inbox.composeDescription": "Valores predeterminados para mensajes nuevos. Cada mensaje puede cambiarlos en el editor.",
+ "settings.compose.trackOpensTitle": "Confirmaciones de lectura activadas por defecto",
+ "settings.compose.trackOpensDescription": "Los mensajes nuevos empiezan con el ojo activado. Las apps de los destinatarios pueden bloquear la imagen igualmente.",
+ "settings.compose.failed": "No se pudieron guardar los ajustes de redacción.",
+ "settings.compose.migrationRequired": "Ejecuta primero «Actualizar base de datos» en Administración.",
"settingsPage.inbox.shortcuts": "Atajos",
"settingsPage.inbox.shortcutsDescription": "Elige si los atajos de teclado están activos.",
"settingsPage.inbox.notifications": "Notificaciones",
diff --git a/public/locales/fa.json b/public/locales/fa.json
index 7248f7f..cb5dfdf 100644
--- a/public/locales/fa.json
+++ b/public/locales/fa.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "انتخاب کنید ایمیل‌ها در صندوق ورودی چگونه سازمان‌دهی شوند.",
"settingsPage.inbox.addresses": "نشانی‌ها",
"settingsPage.inbox.addressesDescription": "انتخاب کنید نشانی گیرندگان هنگام خواندن ایمیل چگونه نمایش داده شوند.",
+ "settingsPage.inbox.compose": "نوشتن",
+ "settingsPage.inbox.composeDescription": "پیش‌فرض‌های پیام‌های جدید. هر پیام همچنان می‌تواند آن‌ها را در ویرایشگر تغییر دهد.",
+ "settings.compose.trackOpensTitle": "رسید خواندن به‌طور پیش‌فرض روشن",
+ "settings.compose.trackOpensDescription": "پیام‌های جدید با چشم روشن شروع می‌شوند. برنامه‌های گیرندگان ممکن است همچنان تصویر را مسدود کنند.",
+ "settings.compose.failed": "تنظیمات نوشتن ذخیره نشد.",
+ "settings.compose.migrationRequired": "ابتدا در مدیریت «به‌روزرسانی پایگاه داده» را اجرا کنید.",
"settingsPage.inbox.shortcuts": "میانبرها",
"settingsPage.inbox.shortcutsDescription": "انتخاب کنید میانبرهای صفحه‌کلید فعال باشند یا نه.",
"settingsPage.inbox.notifications": "اعلان‌ها",
diff --git a/public/locales/fr.json b/public/locales/fr.json
index 0597bc2..d48fd75 100644
--- a/public/locales/fr.json
+++ b/public/locales/fr.json
@@ -738,6 +738,12 @@
"settingsPage.inbox.threadingDescription": "Choisissez comment les e-mails sont organisés dans votre boîte de réception.",
"settingsPage.inbox.addresses": "Adresses",
"settingsPage.inbox.addressesDescription": "Choisissez comment les adresses des destinataires s'affichent lorsque vous lisez vos e-mails.",
+ "settingsPage.inbox.compose": "Rédaction",
+ "settingsPage.inbox.composeDescription": "Valeurs par défaut des nouveaux messages. Chaque message peut encore les changer dans l'éditeur.",
+ "settings.compose.trackOpensTitle": "Accusés de lecture activés par défaut",
+ "settings.compose.trackOpensDescription": "Les nouveaux messages démarrent avec l'œil activé. Les applications des destinataires peuvent quand même bloquer l'image.",
+ "settings.compose.failed": "Impossible d'enregistrer les réglages de rédaction.",
+ "settings.compose.migrationRequired": "Lancez d'abord « Mettre à jour la base de données » dans l'administration.",
"settingsPage.inbox.shortcuts": "Raccourcis",
"settingsPage.inbox.shortcutsDescription": "Choisissez si les raccourcis clavier sont actifs.",
"settingsPage.inbox.notifications": "Notifications",
diff --git a/public/locales/gu.json b/public/locales/gu.json
index ba51aab..b870751 100644
--- a/public/locales/gu.json
+++ b/public/locales/gu.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "તમારા ઇનબૉક્સમાં ઇમેઇલ કેવી રીતે ગોઠવાય તે પસંદ કરો.",
"settingsPage.inbox.addresses": "સરનામાં",
"settingsPage.inbox.addressesDescription": "મેઇલ વાંચતી વખતે પ્રાપ્તકર્તાના સરનામાં કેવા દેખાય તે પસંદ કરો.",
+ "settingsPage.inbox.compose": "લખો",
+ "settingsPage.inbox.composeDescription": "નવા સંદેશાઓ માટે ડિફૉલ્ટ. દરેક સંદેશ એડિટરમાં તેને બદલી શકે છે.",
+ "settings.compose.trackOpensTitle": "વાંચન રસીદ ડિફૉલ્ટ રૂપે ચાલુ",
+ "settings.compose.trackOpensDescription": "નવા સંદેશા આંખ ચાલુ સાથે શરૂ થાય છે. પ્રાપ્તકર્તાઓની એપ્સ છતાં છબી અવરોધી શકે છે.",
+ "settings.compose.failed": "લખવાની સેટિંગ્સ સાચવી શકાઈ નહીં.",
+ "settings.compose.migrationRequired": "પહેલાં એડમિનમાં “ડેટાબેઝ અપડેટ કરો” ચલાવો.",
"settingsPage.inbox.shortcuts": "શૉર્ટકટ",
"settingsPage.inbox.shortcutsDescription": "કીબોર્ડ શૉર્ટકટ સક્રિય છે કે નહીં તે પસંદ કરો.",
"settingsPage.inbox.notifications": "સૂચનાઓ",
diff --git a/public/locales/ha.json b/public/locales/ha.json
index 2d42a48..b691e41 100644
--- a/public/locales/ha.json
+++ b/public/locales/ha.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "Zaɓi yadda ake tsara imel a akwatin saƙonka.",
"settingsPage.inbox.addresses": "Adiresoshi",
"settingsPage.inbox.addressesDescription": "Zaɓi yadda adiresoshin masu karɓa ke bayyana lokacin da kake karanta saƙo.",
+ "settingsPage.inbox.compose": "Rubuta",
+ "settingsPage.inbox.composeDescription": "Tsoffin saituna don sabbin saƙonni. Kowane saƙo zai iya canza su a edita.",
+ "settings.compose.trackOpensTitle": "Rasidin karantawa a kunne ta tsohuwa",
+ "settings.compose.trackOpensDescription": "Sabbin saƙonni suna farawa da ido a kunne. Manhajojin masu karɓa na iya toshe hoton duk da haka.",
+ "settings.compose.failed": "Ba a iya ajiye saitunan rubutu ba.",
+ "settings.compose.migrationRequired": "Da farko gudanar da “Sabunta bayanan bayanai” a Gudanarwa.",
"settingsPage.inbox.shortcuts": "Gajerun hanyoyi",
"settingsPage.inbox.shortcutsDescription": "Zaɓi ko gajerun hanyoyin madannai suna aiki.",
"settingsPage.inbox.notifications": "Sanarwa",
diff --git a/public/locales/hi.json b/public/locales/hi.json
index c53106b..043b492 100644
--- a/public/locales/hi.json
+++ b/public/locales/hi.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "चुनें कि आपके इनबॉक्स में ईमेल कैसे व्यवस्थित हों।",
"settingsPage.inbox.addresses": "पते",
"settingsPage.inbox.addressesDescription": "चुनें कि मेल पढ़ते समय प्राप्तकर्ताओं के पते कैसे दिखें।",
+ "settingsPage.inbox.compose": "लिखें",
+ "settingsPage.inbox.composeDescription": "नए संदेशों के लिए डिफ़ॉल्ट। हर संदेश इन्हें संपादक में बदल सकता है।",
+ "settings.compose.trackOpensTitle": "पढ़ने की रसीद डिफ़ॉल्ट रूप से चालू",
+ "settings.compose.trackOpensDescription": "नए संदेश आँख चालू के साथ शुरू होते हैं। प्राप्तकर्ताओं के ऐप फिर भी छवि रोक सकते हैं।",
+ "settings.compose.failed": "लिखने की सेटिंग सहेजी नहीं जा सकी।",
+ "settings.compose.migrationRequired": "पहले एडमिन में “डेटाबेस अपडेट करें” चलाएँ।",
"settingsPage.inbox.shortcuts": "शॉर्टकट",
"settingsPage.inbox.shortcutsDescription": "चुनें कि कीबोर्ड शॉर्टकट सक्रिय हों या नहीं।",
"settingsPage.inbox.notifications": "सूचनाएँ",
diff --git a/public/locales/id.json b/public/locales/id.json
index eb9c0b3..d975cf7 100644
--- a/public/locales/id.json
+++ b/public/locales/id.json
@@ -726,6 +726,12 @@
"settingsPage.inbox.threadingDescription": "Pilih bagaimana email diatur di kotak masuk Anda.",
"settingsPage.inbox.addresses": "Alamat",
"settingsPage.inbox.addressesDescription": "Pilih bagaimana alamat penerima ditampilkan saat Anda membaca email.",
+ "settingsPage.inbox.compose": "Menulis",
+ "settingsPage.inbox.composeDescription": "Bawaan untuk pesan baru. Setiap pesan tetap bisa mengubahnya di editor.",
+ "settings.compose.trackOpensTitle": "Tanda terbaca aktif secara bawaan",
+ "settings.compose.trackOpensDescription": "Pesan baru dimulai dengan mata aktif. Aplikasi penerima tetap bisa memblokir gambar.",
+ "settings.compose.failed": "Pengaturan menulis tidak dapat disimpan.",
+ "settings.compose.migrationRequired": "Jalankan dulu “Perbarui database” di Admin.",
"settingsPage.inbox.shortcuts": "Pintasan",
"settingsPage.inbox.shortcutsDescription": "Pilih apakah pintasan keyboard aktif.",
"settingsPage.inbox.notifications": "Notifikasi",
diff --git a/public/locales/it.json b/public/locales/it.json
index ddfe735..271fd22 100644
--- a/public/locales/it.json
+++ b/public/locales/it.json
@@ -738,6 +738,12 @@
"settingsPage.inbox.threadingDescription": "Scegli come sono organizzate le email nella posta in arrivo.",
"settingsPage.inbox.addresses": "Indirizzi",
"settingsPage.inbox.addressesDescription": "Scegli come appaiono gli indirizzi dei destinatari quando leggi la posta.",
+ "settingsPage.inbox.compose": "Scrittura",
+ "settingsPage.inbox.composeDescription": "Impostazioni predefinite per i nuovi messaggi. Ogni messaggio può comunque cambiarle nell'editor.",
+ "settings.compose.trackOpensTitle": "Conferme di lettura attive per impostazione predefinita",
+ "settings.compose.trackOpensDescription": "I nuovi messaggi partono con l'occhio attivo. Le app dei destinatari possono comunque bloccare l'immagine.",
+ "settings.compose.failed": "Impossibile salvare le impostazioni di scrittura.",
+ "settings.compose.migrationRequired": "Esegui prima «Aggiorna database» in Amministrazione.",
"settingsPage.inbox.shortcuts": "Scorciatoie",
"settingsPage.inbox.shortcutsDescription": "Scegli se attivare le scorciatoie da tastiera.",
"settingsPage.inbox.notifications": "Notifiche",
diff --git a/public/locales/ja.json b/public/locales/ja.json
index c9a2301..3997c81 100644
--- a/public/locales/ja.json
+++ b/public/locales/ja.json
@@ -726,6 +726,12 @@
"settingsPage.inbox.threadingDescription": "受信トレイ内でのメールの整理方法を選択します。",
"settingsPage.inbox.addresses": "アドレス",
"settingsPage.inbox.addressesDescription": "メールを読むときの宛先アドレスの表示方法を選択します。",
+ "settingsPage.inbox.compose": "作成",
+ "settingsPage.inbox.composeDescription": "新しいメッセージの既定値です。各メッセージでエディタから変更できます。",
+ "settings.compose.trackOpensTitle": "開封確認を既定でオン",
+ "settings.compose.trackOpensDescription": "新しいメッセージは目のアイコンがオンの状態で始まります。受信者のメールアプリが画像をブロックすることはあります。",
+ "settings.compose.failed": "作成の設定を保存できませんでした。",
+ "settings.compose.migrationRequired": "先に管理画面で「データベースを更新」を実行してください。",
"settingsPage.inbox.shortcuts": "ショートカット",
"settingsPage.inbox.shortcutsDescription": "キーボードショートカットを有効にするかどうかを選択します。",
"settingsPage.inbox.notifications": "通知",
diff --git a/public/locales/kn.json b/public/locales/kn.json
index 1985695..1fa2c7d 100644
--- a/public/locales/kn.json
+++ b/public/locales/kn.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "ನಿಮ್ಮ ಇನ್‌ಬಾಕ್ಸ್‌ನಲ್ಲಿ ಇಮೇಲ್‌ಗಳನ್ನು ಹೇಗೆ ಸಂಘಟಿಸಬೇಕು ಎಂಬುದನ್ನು ಆರಿಸಿ.",
"settingsPage.inbox.addresses": "ವಿಳಾಸಗಳು",
"settingsPage.inbox.addressesDescription": "ಮೇಲ್ ಓದುವಾಗ ಸ್ವೀಕರಿಸುವವರ ವಿಳಾಸಗಳು ಹೇಗೆ ಕಾಣಿಸಬೇಕು ಎಂಬುದನ್ನು ಆರಿಸಿ.",
+ "settingsPage.inbox.compose": "ಬರೆಯಿರಿ",
+ "settingsPage.inbox.composeDescription": "ಹೊಸ ಸಂದೇಶಗಳ ಡೀಫಾಲ್ಟ್‌ಗಳು. ಪ್ರತಿ ಸಂದೇಶವು ಎಡಿಟರ್‌ನಲ್ಲಿ ಇವನ್ನು ಬದಲಿಸಬಹುದು.",
+ "settings.compose.trackOpensTitle": "ಓದಿದ ರಸೀದಿ ಡೀಫಾಲ್ಟ್ ಆಗಿ ಆನ್",
+ "settings.compose.trackOpensDescription": "ಹೊಸ ಸಂದೇಶಗಳು ಕಣ್ಣು ಆನ್ ಆಗಿ ಪ್ರಾರಂಭವಾಗುತ್ತವೆ. ಸ್ವೀಕರಿಸುವವರ ಆ್ಯಪ್‌ಗಳು ಆದರೂ ಚಿತ್ರವನ್ನು ತಡೆಯಬಹುದು.",
+ "settings.compose.failed": "ಬರೆಯುವ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಉಳಿಸಲಾಗಲಿಲ್ಲ.",
+ "settings.compose.migrationRequired": "ಮೊದಲು ಆಡ್ಮಿನ್‌ನಲ್ಲಿ “ಡೇಟಾಬೇಸ್ ನವೀಕರಿಸಿ” ಚಲಾಯಿಸಿ.",
"settingsPage.inbox.shortcuts": "ಶಾರ್ಟ್‌ಕಟ್‌ಗಳು",
"settingsPage.inbox.shortcutsDescription": "ಕೀಬೋರ್ಡ್ ಶಾರ್ಟ್‌ಕಟ್‌ಗಳು ಸಕ್ರಿಯವಾಗಿರಬೇಕೇ ಎಂಬುದನ್ನು ಆರಿಸಿ.",
"settingsPage.inbox.notifications": "ಅಧಿಸೂಚನೆಗಳು",
diff --git a/public/locales/ko.json b/public/locales/ko.json
index b13bcd3..f5b49c0 100644
--- a/public/locales/ko.json
+++ b/public/locales/ko.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "받은편지함에서 이메일을 정리하는 방식을 선택하세요.",
"settingsPage.inbox.addresses": "주소",
"settingsPage.inbox.addressesDescription": "메일을 읽을 때 받는사람 주소가 표시되는 방식을 선택하세요.",
+ "settingsPage.inbox.compose": "작성",
+ "settingsPage.inbox.composeDescription": "새 메시지의 기본값입니다. 각 메시지에서 편집기로 바꿀 수 있습니다.",
+ "settings.compose.trackOpensTitle": "읽음 확인 기본으로 켜기",
+ "settings.compose.trackOpensDescription": "새 메시지는 눈 아이콘이 켜진 상태로 시작합니다. 받는 사람의 메일 앱이 이미지를 차단할 수는 있습니다.",
+ "settings.compose.failed": "작성 설정을 저장하지 못했습니다.",
+ "settings.compose.migrationRequired": "먼저 관리자에서 “데이터베이스 업데이트”를 실행하세요.",
"settingsPage.inbox.shortcuts": "단축키",
"settingsPage.inbox.shortcutsDescription": "키보드 단축키를 사용할지 선택하세요.",
"settingsPage.inbox.notifications": "알림",
diff --git a/public/locales/ml.json b/public/locales/ml.json
index 58624b0..6c58bd7 100644
--- a/public/locales/ml.json
+++ b/public/locales/ml.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "നിങ്ങളുടെ ഇൻബോക്സിൽ ഇമെയിലുകൾ എങ്ങനെ ക്രമീകരിക്കണമെന്ന് തിരഞ്ഞെടുക്കുക.",
"settingsPage.inbox.addresses": "വിലാസങ്ങൾ",
"settingsPage.inbox.addressesDescription": "മെയിൽ വായിക്കുമ്പോൾ സ്വീകർത്താക്കളുടെ വിലാസങ്ങൾ എങ്ങനെ കാണപ്പെടണമെന്ന് തിരഞ്ഞെടുക്കുക.",
+ "settingsPage.inbox.compose": "എഴുതുക",
+ "settingsPage.inbox.composeDescription": "പുതിയ സന്ദേശങ്ങളുടെ ഡിഫോൾട്ടുകൾ. ഓരോ സന്ദേശത്തിനും എഡിറ്ററിൽ ഇവ മാറ്റാം.",
+ "settings.compose.trackOpensTitle": "വായന രസീത് ഡിഫോൾട്ടായി ഓൺ",
+ "settings.compose.trackOpensDescription": "പുതിയ സന്ദേശങ്ങൾ കണ്ണ് ഓണാക്കി തുടങ്ങുന്നു. സ്വീകർത്താക്കളുടെ ആപ്പുകൾ എന്നിട്ടും ചിത്രം തടഞ്ഞേക്കാം.",
+ "settings.compose.failed": "എഴുത്ത് ക്രമീകരണങ്ങൾ സംരക്ഷിക്കാനായില്ല.",
+ "settings.compose.migrationRequired": "ആദ്യം അഡ്മിനിൽ “ഡാറ്റാബേസ് അപ്ഡേറ്റ് ചെയ്യുക” പ്രവർത്തിപ്പിക്കുക.",
"settingsPage.inbox.shortcuts": "കുറുക്കുവഴികൾ",
"settingsPage.inbox.shortcutsDescription": "കീബോർഡ് കുറുക്കുവഴികൾ സജീവമാകണോ എന്ന് തിരഞ്ഞെടുക്കുക.",
"settingsPage.inbox.notifications": "അറിയിപ്പുകൾ",
diff --git a/public/locales/mr.json b/public/locales/mr.json
index 18d49ef..023f216 100644
--- a/public/locales/mr.json
+++ b/public/locales/mr.json
@@ -730,6 +730,12 @@
"settingsPage.inbox.threadingDescription": "तुमच्या इनबॉक्समध्ये ईमेल कसे व्यवस्थित केले जावेत ते निवडा.",
"settingsPage.inbox.addresses": "पत्ते",
"settingsPage.inbox.addressesDescription": "मेल वाचताना प्राप्तकर्त्यांचे पत्ते कसे दिसावेत ते निवडा.",
+ "settingsPage.inbox.compose": "लिहा",
+ "settingsPage.inbox.composeDescription": "नवीन संदेशांसाठी डीफॉल्ट. प्रत्येक संदेश संपादकात ते बदलू शकतो.",
+ "settings.compose.trackOpensTitle": "वाचन पावती डीफॉल्टनुसार चालू",
+ "settings.compose.trackOpensDescription": "नवीन संदेश डोळा चालू ठेवून सुरू होतात. प्राप्तकर्त्यांची ॲप्स तरीही प्रतिमा रोखू शकतात.",
+ "settings.compose.failed": "लिहिण्याच्या सेटिंग्ज जतन करता आल्या नाहीत.",
+ "settings.compose.migrationRequired": "आधी ॲडमिनमध्ये “डेटाबेस अपडेट करा” चालवा.",
"settingsPage.inbox.shortcuts": "शॉर्टकट",
"settingsPage.inbox.shortcutsDescription": "कीबोर्ड शॉर्टकट सक्रिय असावेत का ते निवडा.",
"settingsPage.inbox.notifications": "सूचना",
diff --git a/public/locales/ms.json b/public/locales/ms.json
index 44235dd..16dbef6 100644
--- a/public/locales/ms.json
+++ b/public/locales/ms.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "Pilih cara e-mel disusun dalam peti masuk anda.",
"settingsPage.inbox.addresses": "Alamat",
"settingsPage.inbox.addressesDescription": "Pilih cara alamat penerima dipaparkan semasa anda membaca mel.",
+ "settingsPage.inbox.compose": "Menulis",
+ "settingsPage.inbox.composeDescription": "Lalai untuk mesej baharu. Setiap mesej masih boleh menukarnya dalam editor.",
+ "settings.compose.trackOpensTitle": "Resit baca aktif secara lalai",
+ "settings.compose.trackOpensDescription": "Mesej baharu bermula dengan mata aktif. Aplikasi penerima masih boleh menyekat imej.",
+ "settings.compose.failed": "Tetapan menulis tidak dapat disimpan.",
+ "settings.compose.migrationRequired": "Jalankan dahulu “Kemas kini pangkalan data” dalam Pentadbir.",
"settingsPage.inbox.shortcuts": "Pintasan",
"settingsPage.inbox.shortcutsDescription": "Pilih sama ada pintasan papan kekunci aktif.",
"settingsPage.inbox.notifications": "Pemberitahuan",
diff --git a/public/locales/nl.json b/public/locales/nl.json
index 012a4a0..aeba516 100644
--- a/public/locales/nl.json
+++ b/public/locales/nl.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "Kies hoe e-mails in je postvak IN worden georganiseerd.",
"settingsPage.inbox.addresses": "Adressen",
"settingsPage.inbox.addressesDescription": "Kies hoe ontvangersadressen worden weergegeven wanneer je mail leest.",
+ "settingsPage.inbox.compose": "Opstellen",
+ "settingsPage.inbox.composeDescription": "Standaardwaarden voor nieuwe berichten. Elk bericht kan ze in de editor nog wijzigen.",
+ "settings.compose.trackOpensTitle": "Leesbevestigingen standaard aan",
+ "settings.compose.trackOpensDescription": "Nieuwe berichten starten met het oog aan. Mailapps van ontvangers kunnen de afbeelding toch blokkeren.",
+ "settings.compose.failed": "De instellingen voor opstellen konden niet worden opgeslagen.",
+ "settings.compose.migrationRequired": "Voer eerst ‘Database bijwerken’ uit in Beheer.",
"settingsPage.inbox.shortcuts": "Sneltoetsen",
"settingsPage.inbox.shortcutsDescription": "Kies of toetsenbordsneltoetsen actief zijn.",
"settingsPage.inbox.notifications": "Meldingen",
diff --git a/public/locales/pa.json b/public/locales/pa.json
index 1dc6ff5..3eb5940 100644
--- a/public/locales/pa.json
+++ b/public/locales/pa.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "ਚੁਣੋ ਕਿ ਤੁਹਾਡੇ ਇਨਬਾਕਸ ਵਿੱਚ ਈਮੇਲਾਂ ਕਿਵੇਂ ਵਿਵਸਥਿਤ ਹੋਣ।",
"settingsPage.inbox.addresses": "ਪਤੇ",
"settingsPage.inbox.addressesDescription": "ਚੁਣੋ ਕਿ ਮੇਲ ਪੜ੍ਹਦੇ ਸਮੇਂ ਪ੍ਰਾਪਤਕਰਤਾ ਦੇ ਪਤੇ ਕਿਵੇਂ ਦਿਖਾਈ ਦੇਣ।",
+ "settingsPage.inbox.compose": "ਲਿਖੋ",
+ "settingsPage.inbox.composeDescription": "ਨਵੇਂ ਸੁਨੇਹਿਆਂ ਲਈ ਡਿਫੌਲਟ। ਹਰ ਸੁਨੇਹਾ ਇਹਨਾਂ ਨੂੰ ਐਡੀਟਰ ਵਿੱਚ ਬਦਲ ਸਕਦਾ ਹੈ।",
+ "settings.compose.trackOpensTitle": "ਪੜ੍ਹਨ ਦੀ ਰਸੀਦ ਡਿਫੌਲਟ ਤੌਰ 'ਤੇ ਚਾਲੂ",
+ "settings.compose.trackOpensDescription": "ਨਵੇਂ ਸੁਨੇਹੇ ਅੱਖ ਚਾਲੂ ਨਾਲ ਸ਼ੁਰੂ ਹੁੰਦੇ ਹਨ। ਪ੍ਰਾਪਤਕਰਤਾਵਾਂ ਦੀਆਂ ਐਪਾਂ ਫਿਰ ਵੀ ਤਸਵੀਰ ਰੋਕ ਸਕਦੀਆਂ ਹਨ।",
+ "settings.compose.failed": "ਲਿਖਣ ਦੀਆਂ ਸੈਟਿੰਗਾਂ ਸੰਭਾਲੀਆਂ ਨਹੀਂ ਜਾ ਸਕੀਆਂ।",
+ "settings.compose.migrationRequired": "ਪਹਿਲਾਂ ਐਡਮਿਨ ਵਿੱਚ “ਡਾਟਾਬੇਸ ਅੱਪਡੇਟ ਕਰੋ” ਚਲਾਓ।",
"settingsPage.inbox.shortcuts": "ਸ਼ਾਰਟਕੱਟ",
"settingsPage.inbox.shortcutsDescription": "ਚੁਣੋ ਕਿ ਕੀਬੋਰਡ ਸ਼ਾਰਟਕੱਟ ਸਰਗਰਮ ਹਨ ਜਾਂ ਨਹੀਂ।",
"settingsPage.inbox.notifications": "ਸੂਚਨਾਵਾਂ",
diff --git a/public/locales/pl.json b/public/locales/pl.json
index e6f8f62..f752889 100644
--- a/public/locales/pl.json
+++ b/public/locales/pl.json
@@ -744,6 +744,12 @@
"settingsPage.inbox.threadingDescription": "Wybierz, jak e-maile są uporządkowane w skrzynce odbiorczej.",
"settingsPage.inbox.addresses": "Adresy",
"settingsPage.inbox.addressesDescription": "Wybierz, jak wyświetlane są adresy odbiorców podczas czytania poczty.",
+ "settingsPage.inbox.compose": "Pisanie",
+ "settingsPage.inbox.composeDescription": "Ustawienia domyślne nowych wiadomości. Każda wiadomość może je zmienić w edytorze.",
+ "settings.compose.trackOpensTitle": "Potwierdzenia odczytu domyślnie włączone",
+ "settings.compose.trackOpensDescription": "Nowe wiadomości zaczynają z włączonym okiem. Aplikacje odbiorców mogą mimo to zablokować obraz.",
+ "settings.compose.failed": "Nie udało się zapisać ustawień pisania.",
+ "settings.compose.migrationRequired": "Najpierw uruchom „Aktualizuj bazę danych” w panelu administratora.",
"settingsPage.inbox.shortcuts": "Skróty",
"settingsPage.inbox.shortcutsDescription": "Wybierz, czy skróty klawiszowe są aktywne.",
"settingsPage.inbox.notifications": "Powiadomienia",
diff --git a/public/locales/pt-BR.json b/public/locales/pt-BR.json
index 978314e..4baab77 100644
--- a/public/locales/pt-BR.json
+++ b/public/locales/pt-BR.json
@@ -738,6 +738,12 @@
"settingsPage.inbox.threadingDescription": "Escolha como os e-mails são organizados na sua caixa de entrada.",
"settingsPage.inbox.addresses": "Endereços",
"settingsPage.inbox.addressesDescription": "Escolha como os endereços dos destinatários aparecem ao ler e-mails.",
+ "settingsPage.inbox.compose": "Escrever",
+ "settingsPage.inbox.composeDescription": "Padrões para novas mensagens. Cada mensagem ainda pode alterá-los no editor.",
+ "settings.compose.trackOpensTitle": "Confirmações de leitura ativadas por padrão",
+ "settings.compose.trackOpensDescription": "Novas mensagens começam com o olho ativado. Os apps dos destinatários ainda podem bloquear a imagem.",
+ "settings.compose.failed": "Não foi possível salvar as configurações de escrita.",
+ "settings.compose.migrationRequired": "Execute primeiro “Atualizar banco de dados” no Admin.",
"settingsPage.inbox.shortcuts": "Atalhos",
"settingsPage.inbox.shortcutsDescription": "Escolha se os atalhos de teclado ficam ativos.",
"settingsPage.inbox.notifications": "Notificações",
diff --git a/public/locales/pt-PT.json b/public/locales/pt-PT.json
index 8294afc..0cee981 100644
--- a/public/locales/pt-PT.json
+++ b/public/locales/pt-PT.json
@@ -738,6 +738,12 @@
"settingsPage.inbox.threadingDescription": "Escolha como os emails são organizados na sua caixa de entrada.",
"settingsPage.inbox.addresses": "Endereços",
"settingsPage.inbox.addressesDescription": "Escolha como os endereços dos destinatários aparecem ao ler emails.",
+ "settingsPage.inbox.compose": "Escrever",
+ "settingsPage.inbox.composeDescription": "Predefinições para novas mensagens. Cada mensagem pode alterá-las no editor.",
+ "settings.compose.trackOpensTitle": "Confirmações de leitura ativadas por predefinição",
+ "settings.compose.trackOpensDescription": "As novas mensagens começam com o olho ativado. As aplicações dos destinatários podem bloquear a imagem.",
+ "settings.compose.failed": "Não foi possível guardar as definições de escrita.",
+ "settings.compose.migrationRequired": "Execute primeiro “Atualizar base de dados” na Administração.",
"settingsPage.inbox.shortcuts": "Atalhos",
"settingsPage.inbox.shortcutsDescription": "Escolha se os atalhos de teclado ficam ativos.",
"settingsPage.inbox.notifications": "Notificações",
diff --git a/public/locales/ru.json b/public/locales/ru.json
index 2264694..993a137 100644
--- a/public/locales/ru.json
+++ b/public/locales/ru.json
@@ -744,6 +744,12 @@
"settingsPage.inbox.threadingDescription": "Выберите, как письма организованы во входящих.",
"settingsPage.inbox.addresses": "Адреса",
"settingsPage.inbox.addressesDescription": "Выберите, как отображаются адреса получателей при чтении почты.",
+ "settingsPage.inbox.compose": "Написание",
+ "settingsPage.inbox.composeDescription": "Значения по умолчанию для новых писем. Каждое письмо может изменить их в редакторе.",
+ "settings.compose.trackOpensTitle": "Отслеживание прочтения включено по умолчанию",
+ "settings.compose.trackOpensDescription": "Новые письма начинаются с включённым глазом. Почтовые приложения получателей всё равно могут блокировать изображение.",
+ "settings.compose.failed": "Не удалось сохранить настройки написания.",
+ "settings.compose.migrationRequired": "Сначала выполните «Обновить базу данных» в админке.",
"settingsPage.inbox.shortcuts": "Горячие клавиши",
"settingsPage.inbox.shortcutsDescription": "Выберите, включены ли сочетания клавиш.",
"settingsPage.inbox.notifications": "Уведомления",
diff --git a/public/locales/si.json b/public/locales/si.json
index d9cc05f..4c7caa3 100644
--- a/public/locales/si.json
+++ b/public/locales/si.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "ඔබේ එන ලිපි තුළ ඊමේල් සංවිධානය වන ආකාරය තෝරන්න.",
"settingsPage.inbox.addresses": "ලිපින",
"settingsPage.inbox.addressesDescription": "තැපැල් කියවන විට ලබන්නන්ගේ ලිපින පෙන්වන ආකාරය තෝරන්න.",
+ "settingsPage.inbox.compose": "ලියන්න",
+ "settingsPage.inbox.composeDescription": "නව පණිවිඩ සඳහා පෙරනිමි. සෑම පණිවිඩයකටම සංස්කාරකයේ ඒවා වෙනස් කළ හැක.",
+ "settings.compose.trackOpensTitle": "කියවූ රිසිට්පත පෙරනිමියෙන් සක්‍රියයි",
+ "settings.compose.trackOpensDescription": "නව පණිවිඩ ඇස සක්‍රිය කර ආරම්භ වේ. ලබන්නන්ගේ යෙදුම් තවමත් රූපය අවහිර කළ හැක.",
+ "settings.compose.failed": "ලිවීමේ සැකසුම් සුරැකිය නොහැකි විය.",
+ "settings.compose.migrationRequired": "පළමුව පරිපාලනයේ “දත්ත සමුදාය යාවත්කාලීන කරන්න” ධාවනය කරන්න.",
"settingsPage.inbox.shortcuts": "කෙටිමං",
"settingsPage.inbox.shortcutsDescription": "යතුරුපුවරු කෙටිමං සක්‍රීය විය යුතුද යන්න තෝරන්න.",
"settingsPage.inbox.notifications": "දැනුම්දීම්",
diff --git a/public/locales/sw.json b/public/locales/sw.json
index e694f54..c66fa8c 100644
--- a/public/locales/sw.json
+++ b/public/locales/sw.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "Chagua jinsi barua pepe zinavyopangwa kwenye kikasha chako.",
"settingsPage.inbox.addresses": "Anwani",
"settingsPage.inbox.addressesDescription": "Chagua jinsi anwani za wapokeaji zinavyoonekana unaposoma barua.",
+ "settingsPage.inbox.compose": "Andika",
+ "settingsPage.inbox.composeDescription": "Chaguo-msingi kwa ujumbe mpya. Kila ujumbe bado unaweza kuzibadilisha kwenye kihariri.",
+ "settings.compose.trackOpensTitle": "Risiti za kusoma zimewashwa kwa chaguo-msingi",
+ "settings.compose.trackOpensDescription": "Ujumbe mpya huanza jicho likiwa limewashwa. Programu za wapokeaji bado zinaweza kuzuia picha.",
+ "settings.compose.failed": "Imeshindikana kuhifadhi mipangilio ya kuandika.",
+ "settings.compose.migrationRequired": "Kwanza endesha “Sasisha hifadhidata” kwenye Usimamizi.",
"settingsPage.inbox.shortcuts": "Njia za mkato",
"settingsPage.inbox.shortcutsDescription": "Chagua kama njia za mkato za kibodi zinatumika.",
"settingsPage.inbox.notifications": "Arifa",
diff --git a/public/locales/ta.json b/public/locales/ta.json
index a0f93c2..b136fac 100644
--- a/public/locales/ta.json
+++ b/public/locales/ta.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "உங்கள் இன்பாக்ஸில் மின்னஞ்சல்கள் எவ்வாறு ஒழுங்கமைக்கப்படும் என்பதைத் தேர்வுசெய்யவும்.",
"settingsPage.inbox.addresses": "முகவரிகள்",
"settingsPage.inbox.addressesDescription": "அஞ்சலைப் படிக்கும்போது பெறுநர் முகவரிகள் எவ்வாறு தோன்றும் என்பதைத் தேர்வுசெய்யவும்.",
+ "settingsPage.inbox.compose": "எழுது",
+ "settingsPage.inbox.composeDescription": "புதிய செய்திகளுக்கான இயல்புநிலைகள். ஒவ்வொரு செய்தியும் எடிட்டரில் இவற்றை மாற்றலாம்.",
+ "settings.compose.trackOpensTitle": "படித்த ரசீது இயல்பாக இயக்கத்தில்",
+ "settings.compose.trackOpensDescription": "புதிய செய்திகள் கண் இயக்கத்துடன் தொடங்கும். பெறுநர்களின் பயன்பாடுகள் படத்தைத் தடுக்கலாம்.",
+ "settings.compose.failed": "எழுதும் அமைப்புகளைச் சேமிக்க முடியவில்லை.",
+ "settings.compose.migrationRequired": "முதலில் நிர்வாகத்தில் “தரவுத்தளத்தைப் புதுப்பி” இயக்கவும்.",
"settingsPage.inbox.shortcuts": "குறுக்குவழிகள்",
"settingsPage.inbox.shortcutsDescription": "விசைப்பலகை குறுக்குவழிகள் செயலில் இருக்க வேண்டுமா என்பதைத் தேர்வுசெய்யவும்.",
"settingsPage.inbox.notifications": "அறிவிப்புகள்",
diff --git a/public/locales/te.json b/public/locales/te.json
index 29da517..1bd8563 100644
--- a/public/locales/te.json
+++ b/public/locales/te.json
@@ -730,6 +730,12 @@
"settingsPage.inbox.threadingDescription": "మీ ఇన్‌బాక్స్‌లో ఇమెయిల్‌లు ఎలా అమర్చబడాలో ఎంచుకోండి.",
"settingsPage.inbox.addresses": "చిరునామాలు",
"settingsPage.inbox.addressesDescription": "మెయిల్ చదివేటప్పుడు గ్రహీతల చిరునామాలు ఎలా కనిపించాలో ఎంచుకోండి.",
+ "settingsPage.inbox.compose": "వ్రాయండి",
+ "settingsPage.inbox.composeDescription": "కొత్త సందేశాలకు డిఫాల్ట్‌లు. ప్రతి సందేశం ఎడిటర్‌లో వీటిని మార్చవచ్చు.",
+ "settings.compose.trackOpensTitle": "చదివిన రసీదు డిఫాల్ట్‌గా ఆన్",
+ "settings.compose.trackOpensDescription": "కొత్త సందేశాలు కన్ను ఆన్‌తో మొదలవుతాయి. గ్రహీతల యాప్‌లు అయినా చిత్రాన్ని నిరోధించవచ్చు.",
+ "settings.compose.failed": "వ్రాసే సెట్టింగ్‌లను సేవ్ చేయలేకపోయాం.",
+ "settings.compose.migrationRequired": "ముందుగా అడ్మిన్‌లో “డేటాబేస్ అప్‌డేట్ చేయి” నడపండి.",
"settingsPage.inbox.shortcuts": "షార్ట్‌కట్‌లు",
"settingsPage.inbox.shortcutsDescription": "కీబోర్డ్ షార్ట్‌కట్‌లు సక్రియంగా ఉండాలో లేదో ఎంచుకోండి.",
"settingsPage.inbox.notifications": "నోటిఫికేషన్‌లు",
diff --git a/public/locales/th.json b/public/locales/th.json
index f460ed3..6f53ab1 100644
--- a/public/locales/th.json
+++ b/public/locales/th.json
@@ -732,6 +732,12 @@
"settingsPage.inbox.threadingDescription": "เลือกวิธีจัดระเบียบอีเมลในกล่องจดหมายเข้าของคุณ",
"settingsPage.inbox.addresses": "ที่อยู่",
"settingsPage.inbox.addressesDescription": "เลือกวิธีแสดงที่อยู่ผู้รับเมื่อคุณอ่านอีเมล",
+ "settingsPage.inbox.compose": "เขียน",
+ "settingsPage.inbox.composeDescription": "ค่าเริ่มต้นสำหรับข้อความใหม่ แต่ละข้อความยังเปลี่ยนได้ในตัวแก้ไข",
+ "settings.compose.trackOpensTitle": "เปิดการแจ้งเตือนการอ่านเป็นค่าเริ่มต้น",
+ "settings.compose.trackOpensDescription": "ข้อความใหม่จะเริ่มด้วยไอคอนตาที่เปิดอยู่ แอปของผู้รับยังอาจบล็อกรูปภาพได้",
+ "settings.compose.failed": "ไม่สามารถบันทึกการตั้งค่าการเขียนได้",
+ "settings.compose.migrationRequired": "เรียกใช้ “อัปเดตฐานข้อมูล” ในผู้ดูแลก่อน",
"settingsPage.inbox.shortcuts": "ทางลัด",
"settingsPage.inbox.shortcutsDescription": "เลือกว่าจะเปิดใช้ทางลัดแป้นพิมพ์หรือไม่",
"settingsPage.inbox.notifications": "การแจ้งเตือน",
diff --git a/public/locales/tr.json b/public/locales/tr.json
index 3f955c9..bc1b722 100644
--- a/public/locales/tr.json
+++ b/public/locales/tr.json
@@ -725,6 +725,12 @@
"settingsPage.inbox.threadingDescription": "E-postaların gelen kutunuzda nasıl düzenleneceğini seçin.",
"settingsPage.inbox.addresses": "Adresler",
"settingsPage.inbox.addressesDescription": "E-posta okurken alıcı adreslerinin nasıl görüneceğini seçin.",
+ "settingsPage.inbox.compose": "Yazma",
+ "settingsPage.inbox.composeDescription": "Yeni iletiler için varsayılanlar. Her ileti bunları düzenleyicide yine değiştirebilir.",
+ "settings.compose.trackOpensTitle": "Okundu bilgisi varsayılan olarak açık",
+ "settings.compose.trackOpensDescription": "Yeni iletiler göz açık olarak başlar. Alıcıların e-posta uygulamaları görseli yine de engelleyebilir.",
+ "settings.compose.failed": "Yazma ayarları kaydedilemedi.",
+ "settings.compose.migrationRequired": "Önce Yönetim'de “Veritabanını güncelle”yi çalıştırın.",
"settingsPage.inbox.shortcuts": "Kısayollar",
"settingsPage.inbox.shortcutsDescription": "Klavye kısayollarının etkin olup olmayacağını seçin.",
"settingsPage.inbox.notifications": "Bildirimler",
diff --git a/public/locales/uk.json b/public/locales/uk.json
index a5a6898..663043d 100644
--- a/public/locales/uk.json
+++ b/public/locales/uk.json
@@ -744,6 +744,12 @@
"settingsPage.inbox.threadingDescription": "Виберіть, як упорядковуються листи у ваших вхідних.",
"settingsPage.inbox.addresses": "Адреси",
"settingsPage.inbox.addressesDescription": "Виберіть, як відображаються адреси одержувачів під час читання пошти.",
+ "settingsPage.inbox.compose": "Написання",
+ "settingsPage.inbox.composeDescription": "Типові значення для нових листів. Кожен лист може змінити їх у редакторі.",
+ "settings.compose.trackOpensTitle": "Відстеження прочитання увімкнено за замовчуванням",
+ "settings.compose.trackOpensDescription": "Нові листи починаються з увімкненим оком. Поштові застосунки отримувачів усе одно можуть блокувати зображення.",
+ "settings.compose.failed": "Не вдалося зберегти налаштування написання.",
+ "settings.compose.migrationRequired": "Спершу виконайте «Оновити базу даних» в адмінці.",
"settingsPage.inbox.shortcuts": "Скорочення",
"settingsPage.inbox.shortcutsDescription": "Виберіть, чи активні скорочення клавіатури.",
"settingsPage.inbox.notifications": "Сповіщення",
diff --git a/public/locales/ur.json b/public/locales/ur.json
index 7085eac..b409d8a 100644
--- a/public/locales/ur.json
+++ b/public/locales/ur.json
@@ -730,6 +730,12 @@
"settingsPage.inbox.threadingDescription": "منتخب کریں کہ آپ کے ان باکس میں ای میلز کیسے منظم ہوں۔",
"settingsPage.inbox.addresses": "پتے",
"settingsPage.inbox.addressesDescription": "منتخب کریں کہ میل پڑھتے وقت وصول کنندگان کے پتے کیسے نظر آئیں۔",
+ "settingsPage.inbox.compose": "لکھنا",
+ "settingsPage.inbox.composeDescription": "نئے پیغامات کے لیے طے شدہ ترتیبات۔ ہر پیغام انہیں ایڈیٹر میں بدل سکتا ہے۔",
+ "settings.compose.trackOpensTitle": "پڑھنے کی رسید بطور طے شدہ آن",
+ "settings.compose.trackOpensDescription": "نئے پیغامات آنکھ آن کے ساتھ شروع ہوتے ہیں۔ وصول کنندگان کی ایپس پھر بھی تصویر روک سکتی ہیں۔",
+ "settings.compose.failed": "لکھنے کی ترتیبات محفوظ نہیں ہو سکیں۔",
+ "settings.compose.migrationRequired": "پہلے ایڈمن میں “ڈیٹا بیس اپ ڈیٹ کریں” چلائیں۔",
"settingsPage.inbox.shortcuts": "شارٹ کٹس",
"settingsPage.inbox.shortcutsDescription": "منتخب کریں کہ کی بورڈ شارٹ کٹس فعال ہوں یا نہیں۔",
"settingsPage.inbox.notifications": "اطلاعات",
diff --git a/public/locales/vi.json b/public/locales/vi.json
index 46b84c0..121f8eb 100644
--- a/public/locales/vi.json
+++ b/public/locales/vi.json
@@ -726,6 +726,12 @@
"settingsPage.inbox.threadingDescription": "Chọn cách sắp xếp email trong hộp thư đến của bạn.",
"settingsPage.inbox.addresses": "Địa chỉ",
"settingsPage.inbox.addressesDescription": "Chọn cách hiển thị địa chỉ người nhận khi bạn đọc thư.",
+ "settingsPage.inbox.compose": "Soạn thư",
+ "settingsPage.inbox.composeDescription": "Mặc định cho thư mới. Mỗi thư vẫn có thể thay đổi trong trình soạn.",
+ "settings.compose.trackOpensTitle": "Bật xác nhận đã đọc theo mặc định",
+ "settings.compose.trackOpensDescription": "Thư mới bắt đầu với biểu tượng mắt bật. Ứng dụng của người nhận vẫn có thể chặn hình ảnh.",
+ "settings.compose.failed": "Không thể lưu cài đặt soạn thư.",
+ "settings.compose.migrationRequired": "Trước tiên hãy chạy “Cập nhật cơ sở dữ liệu” trong Quản trị.",
"settingsPage.inbox.shortcuts": "Phím tắt",
"settingsPage.inbox.shortcutsDescription": "Chọn xem phím tắt bàn phím có hoạt động hay không.",
"settingsPage.inbox.notifications": "Thông báo",
diff --git a/public/locales/zh-CN.json b/public/locales/zh-CN.json
index ae4e50d..fb40126 100644
--- a/public/locales/zh-CN.json
+++ b/public/locales/zh-CN.json
@@ -726,6 +726,12 @@
"settingsPage.inbox.threadingDescription": "选择收件箱中邮件的组织方式。",
"settingsPage.inbox.addresses": "地址",
"settingsPage.inbox.addressesDescription": "选择阅读邮件时收件人地址的显示方式。",
+ "settingsPage.inbox.compose": "撰写",
+ "settingsPage.inbox.composeDescription": "新邮件的默认设置。每封邮件仍可在编辑器中更改。",
+ "settings.compose.trackOpensTitle": "默认开启已读回执",
+ "settings.compose.trackOpensDescription": "新邮件开始时眼睛图标为开启状态。收件人的邮件应用仍可能阻止图片。",
+ "settings.compose.failed": "无法保存撰写设置。",
+ "settings.compose.migrationRequired": "请先在管理后台运行“更新数据库”。",
"settingsPage.inbox.shortcuts": "快捷键",
"settingsPage.inbox.shortcutsDescription": "选择是否启用键盘快捷键。",
"settingsPage.inbox.notifications": "通知",
diff --git a/src/app/(settings)/settings/inbox/page.tsx b/src/app/(settings)/settings/inbox/page.tsx
index 5bd6d4b..fdf559b 100644
--- a/src/app/(settings)/settings/inbox/page.tsx
+++ b/src/app/(settings)/settings/inbox/page.tsx
@@ -3,6 +3,7 @@ import { AppearanceSettings } from "@/components/settings/appearance-settings";
import { InboxThreadingSettings } from "@/components/settings/inbox-threading-settings";
import { RemoteContentSettings } from "@/components/settings/remote-content-settings";
import { RecipientAddressSettings } from "@/components/settings/recipient-address-settings";
+import { ComposeDefaultsSettings } from "@/components/settings/compose-defaults-settings";
import { InboxReadingLayoutSettings } from "@/components/settings/inbox-reading-layout-settings";
import { InboxShortcutsSettings } from "@/components/settings/inbox-shortcuts-settings";
import { MailboxAutoReplyForm } from "@/components/settings/mailbox-auto-reply-form";
@@ -50,6 +51,13 @@ export default async function SettingsInboxPage() {
</div>
<RecipientAddressSettings />
</div>
+ <div className="py-6 first:pt-0 last:pb-0">
+ <div className="mb-4">
+ <h3 className="text-base font-semibold text-neutral-900">{t("settingsPage.inbox.compose")}</h3>
+ <p className="mt-1 text-sm text-neutral-500">{t("settingsPage.inbox.composeDescription")}</p>
+ </div>
+ <ComposeDefaultsSettings />
+ </div>
<div className="py-6 first:pt-0 last:pb-0">
<div className="mb-4">
<h3 className="text-base font-semibold text-neutral-900">{t("settingsPage.inbox.shortcuts")}</h3>
diff --git a/src/app/api/settings/compose/route.ts b/src/app/api/settings/compose/route.ts
new file mode 100644
index 0000000..8add1eb
--- /dev/null
+++ b/src/app/api/settings/compose/route.ts
@@ -0,0 +1,29 @@
+import { NextResponse } from "next/server";
+import { requireSessionUser } from "@/lib/api/auth";
+import { getEnv } from "@/lib/cloudflare";
+import { ComposePreferencesUnavailableError, getComposePreferences, setComposePreferences } from "@/lib/compose/preferences";
+
+export async function GET(request: Request) {
+ const env = getEnv();
+ const auth = await requireSessionUser(env, request);
+ if (auth.error) return auth.error;
+ return NextResponse.json(await getComposePreferences(env, auth.user.id));
+}
+
+export async function PATCH(request: Request) {
+ const env = getEnv();
+ const auth = await requireSessionUser(env, request);
+ if (auth.error) return auth.error;
+ const body = (await request.json().catch(() => null)) as { trackOpensDefault?: unknown } | null;
+ if (typeof body?.trackOpensDefault !== "boolean") {
+ return NextResponse.json({ error: "trackOpensDefault must be a boolean" }, { status: 400 });
+ }
+ try {
+ return NextResponse.json(await setComposePreferences(env, auth.user.id, { trackOpensDefault: body.trackOpensDefault }));
+ } catch (error) {
+ if (error instanceof ComposePreferencesUnavailableError) {
+ return NextResponse.json({ error: error.message, code: "MIGRATION_REQUIRED" }, { status: 409 });
+ }
+ throw error;
+ }
+}
diff --git a/src/components/compose/compose-preferences-utils.ts b/src/components/compose/compose-preferences-utils.ts
new file mode 100644
index 0000000..5701ea3
--- /dev/null
+++ b/src/components/compose/compose-preferences-utils.ts
@@ -0,0 +1,36 @@
+import { authFetch } from "@/lib/auth/client";
+import type { ComposePreferences } from "@/lib/compose/types";
+
+let cached: ComposePreferences | null = null;
+let inflight: Promise<ComposePreferences> | null = null;
+
+/** The account's composer defaults, fetched once per page load and shared by every composer. */
+export function loadComposePreferences(): Promise<ComposePreferences> {
+ if (cached) return Promise.resolve(cached);
+ inflight ??= authFetch("/api/settings/compose")
+ .then(async (response) => {
+ if (!response.ok) throw new Error("Failed to load composer settings");
+ cached = (await response.json()) as ComposePreferences;
+ return cached;
+ })
+ .finally(() => {
+ inflight = null;
+ });
+ return inflight;
+}
+
+export function getCachedComposePreferences(): ComposePreferences | null {
+ return cached;
+}
+
+export async function updateComposePreferences(next: ComposePreferences): Promise<ComposePreferences> {
+ const response = await authFetch("/api/settings/compose", {
+ method: "PATCH",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify(next),
+ });
+ const data = (await response.json().catch(() => null)) as (ComposePreferences & { error?: string; code?: string }) | null;
+ if (!response.ok || !data) throw new Error(data?.code === "MIGRATION_REQUIRED" ? "MIGRATION_REQUIRED" : data?.error ?? "Failed to save composer settings");
+ cached = { trackOpensDefault: data.trackOpensDefault };
+ return cached;
+}
diff --git a/src/components/compose/use-track-opens.ts b/src/components/compose/use-track-opens.ts
index 427cb22..fa5f8ba 100644
--- a/src/components/compose/use-track-opens.ts
+++ b/src/components/compose/use-track-opens.ts
@@ -1,43 +1,25 @@
-import { useCallback, useEffect, useState } from "react";
-
-const STORAGE_KEY = "mailflare-track-opens";
-const CHANGE_EVENT = "mailflare:track-opens-changed";
-
-function readStored(): boolean {
- try {
- return localStorage.getItem(STORAGE_KEY) === "on";
- } catch {
- return false;
- }
-}
+import { useEffect, useState } from "react";
+import { getCachedComposePreferences, loadComposePreferences } from "./compose-preferences-utils";
/**
- * Whether new messages carry a read-receipt pixel. Off by default and
- * remembered per browser, so the last choice applies to the next message.
+ * Whether this message carries a read-receipt pixel. Starts from the account
+ * default (Settings → Inbox → Compose); toggling it only affects this message.
*/
export function useTrackOpens(): [boolean, (next: boolean) => void] {
- const [enabled, setEnabled] = useState(false);
+ const [choice, setChoice] = useState<boolean | null>(null);
+ const [accountDefault, setAccountDefault] = useState(() => getCachedComposePreferences()?.trackOpensDefault ?? false);
useEffect(() => {
- const sync = () => setEnabled(readStored());
- sync();
- window.addEventListener(CHANGE_EVENT, sync);
- window.addEventListener("storage", sync);
+ let active = true;
+ void loadComposePreferences()
+ .then((preferences) => {
+ if (active) setAccountDefault(preferences.trackOpensDefault);
+ })
+ .catch(() => undefined);
return () => {
- window.removeEventListener(CHANGE_EVENT, sync);
- window.removeEventListener("storage", sync);
+ active = false;
};
}, []);
- const update = useCallback((next: boolean) => {
- try {
- localStorage.setItem(STORAGE_KEY, next ? "on" : "off");
- } catch {
- // Private mode or blocked storage: the toggle still applies for this page.
- }
- setEnabled(next);
- window.dispatchEvent(new Event(CHANGE_EVENT));
- }, []);
-
- return [enabled, update];
+ return [choice ?? accountDefault, setChoice];
}
diff --git a/src/components/settings/compose-defaults-settings.tsx b/src/components/settings/compose-defaults-settings.tsx
new file mode 100644
index 0000000..69a88e3
--- /dev/null
+++ b/src/components/settings/compose-defaults-settings.tsx
@@ -0,0 +1,63 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { loadComposePreferences, updateComposePreferences } from "@/components/compose/compose-preferences-utils";
+import { useLanguage } from "@/components/language-provider";
+import { Switch } from "@/components/ui/switch";
+
+/** Account-wide composer defaults; each message can still change them in the composer. */
+export function ComposeDefaultsSettings() {
+ const { t } = useLanguage();
+ const [trackOpens, setTrackOpens] = useState(false);
+ const [loading, setLoading] = useState(true);
+ const [saving, setSaving] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+
+ useEffect(() => {
+ let active = true;
+ void loadComposePreferences()
+ .then((preferences) => {
+ if (active) setTrackOpens(preferences.trackOpensDefault);
+ })
+ .catch(() => {
+ if (active) setError(t("settings.compose.failed"));
+ })
+ .finally(() => {
+ if (active) setLoading(false);
+ });
+ return () => {
+ active = false;
+ };
+ }, [t]);
+
+ function change(next: boolean) {
+ const previous = trackOpens;
+ setTrackOpens(next);
+ setSaving(true);
+ setError(null);
+ void updateComposePreferences({ trackOpensDefault: next })
+ .catch((saveError) => {
+ setTrackOpens(previous);
+ setError(saveError instanceof Error && saveError.message === "MIGRATION_REQUIRED" ? t("settings.compose.migrationRequired") : t("settings.compose.failed"));
+ })
+ .finally(() => setSaving(false));
+ }
+
+ return (
+ <div>
+ <label className="flex items-start gap-3 rounded-xl bg-neutral-50 p-4">
+ <span className="flex-1">
+ <span className="block text-sm font-medium text-neutral-900">{t("settings.compose.trackOpensTitle")}</span>
+ <span className="mt-1 block text-sm text-neutral-500">{t("settings.compose.trackOpensDescription")}</span>
+ </span>
+ <Switch
+ checked={trackOpens}
+ disabled={loading || saving}
+ onCheckedChange={change}
+ aria-label={t("settings.compose.trackOpensTitle")}
+ />
+ </label>
+ {error && <p role="alert" className="mt-2 px-4 text-sm text-red-600">{error}</p>}
+ </div>
+ );
+}
diff --git a/src/db/schema/index.ts b/src/db/schema/index.ts
index d6fb287..48b74c1 100644
--- a/src/db/schema/index.ts
+++ b/src/db/schema/index.ts
@@ -470,6 +470,16 @@ export const messageOpens = sqliteTable(
(t) => [index("message_opens_token_idx").on(t.token, t.openedAt)],
);
+/**
+ * Per-user composer defaults. Kept out of `users` because every session
+ * lookup selects the whole users row, which would fail before the migration.
+ */
+export const userComposePreferences = sqliteTable("user_compose_preferences", {
+ userId: text("user_id").primaryKey().references(() => users.id, { onDelete: "cascade" }),
+ trackOpensDefault: integer("track_opens_default", { mode: "boolean" }).notNull().default(false),
+ updatedAt: integer("updated_at", { mode: "timestamp" }).notNull().$defaultFn(() => new Date()),
+});
+
/**
* "Remind me if there is no reply": a sent message whose thread comes back to the
* inbox at `dueAt` unless an inbound message joined the thread after it.
diff --git a/src/lib/backups/export.ts b/src/lib/backups/export.ts
index bf39575..15dd04b 100644
--- a/src/lib/backups/export.ts
+++ b/src/lib/backups/export.ts
@@ -2,14 +2,14 @@ import type { BackupTableGroupId, DatabaseBackupDocument, DatabaseBackupTable, D
import { mergeLegacyMessageBodies } from "./utils";
import { BACKUP_TABLE_GROUPS, getSelectedBackupTables } from "./table-groups";
-export const BACKUP_TABLES: DatabaseBackupTable[] = ["users", "domains", "domain_tracking_hosts", "mailboxes", "mailbox_access", "contacts", "folders", "api_keys", "messages", "message_attachments", "shared_attachment_links", "outbound_jobs", "message_tracking", "message_opens", "follow_ups", "routing_rules", "webhooks", "webhook_deliveries", "sessions", "audit_logs", "backup_settings", "backups", "app_settings", "license_settings", "email_templates", "calendar_events", "booking_events", "auto_reply_deliveries", "spam_token_stats", "spam_reputation", "spam_feedback", "mailbox_aliases", "password_reset_tokens", "mfa_recovery_codes", "login_challenges", "mailbox_agent_settings", "agent_conversations", "agent_chat_messages", "agent_jobs", "agent_draft_metadata", "agent_send_approvals", "mcp_key_mailboxes", "ai_usage", "drive_items", "drive_upload_parts", "drive_shares"];
+export const BACKUP_TABLES: DatabaseBackupTable[] = ["users", "user_compose_preferences", "domains", "domain_tracking_hosts", "mailboxes", "mailbox_access", "contacts", "folders", "api_keys", "messages", "message_attachments", "shared_attachment_links", "outbound_jobs", "message_tracking", "message_opens", "follow_ups", "routing_rules", "webhooks", "webhook_deliveries", "sessions", "audit_logs", "backup_settings", "backups", "app_settings", "license_settings", "email_templates", "calendar_events", "booking_events", "auto_reply_deliveries", "spam_token_stats", "spam_reputation", "spam_feedback", "mailbox_aliases", "password_reset_tokens", "mfa_recovery_codes", "login_challenges", "mailbox_agent_settings", "agent_conversations", "agent_chat_messages", "agent_jobs", "agent_draft_metadata", "agent_send_approvals", "mcp_key_mailboxes", "ai_usage", "drive_items", "drive_upload_parts", "drive_shares"];
/**
* Tables every backup document must contain. Tables added to BACKUP_TABLES
* after the format shipped are absent from older documents, so they stay
* optional here and are filled in as empty on restore.
*/
/** Added by migrations 0068 and later; databases that have not applied them yet back up and restore without them. */
-const LATER_MIGRATION_TABLES: DatabaseBackupTable[] = ["domain_tracking_hosts", "message_tracking", "message_opens", "follow_ups"];
+const LATER_MIGRATION_TABLES: DatabaseBackupTable[] = ["domain_tracking_hosts", "message_tracking", "message_opens", "follow_ups", "user_compose_preferences"];
const REQUIRED_BACKUP_TABLES: DatabaseBackupTable[] = ["users", "domains", "mailboxes", "mailbox_access", "contacts", "folders", "api_keys", "messages", "message_attachments", "outbound_jobs", "routing_rules", "webhooks", "webhook_deliveries", "sessions", "audit_logs", "backup_settings", "backups", "app_settings", "license_settings"];
const INSERT_BATCH_SIZE = 50;
diff --git a/src/lib/backups/table-groups.ts b/src/lib/backups/table-groups.ts
index 4c7f960..f8e54cd 100644
--- a/src/lib/backups/table-groups.ts
+++ b/src/lib/backups/table-groups.ts
@@ -1,7 +1,7 @@
import type { BackupTableGroupId, DatabaseBackupTable } from "./types";
export const BACKUP_TABLE_GROUPS: { id: BackupTableGroupId; label: string; tables: DatabaseBackupTable[] }[] = [
- { id: "accounts", label: "Accounts and mailboxes", tables: ["users", "domains", "domain_tracking_hosts", "mailboxes", "mailbox_access", "mailbox_aliases", "contacts", "api_keys", "mcp_key_mailboxes", "sessions", "password_reset_tokens", "mfa_recovery_codes", "login_challenges"] },
+ { id: "accounts", label: "Accounts and mailboxes", tables: ["users", "user_compose_preferences", "domains", "domain_tracking_hosts", "mailboxes", "mailbox_access", "mailbox_aliases", "contacts", "api_keys", "mcp_key_mailboxes", "sessions", "password_reset_tokens", "mfa_recovery_codes", "login_challenges"] },
{ id: "mail", label: "Mail and related data", tables: ["folders", "messages", "message_attachments", "shared_attachment_links", "outbound_jobs", "message_tracking", "message_opens", "follow_ups", "email_templates", "calendar_events", "booking_events", "auto_reply_deliveries", "spam_token_stats", "spam_reputation", "spam_feedback"] },
{ id: "automation", label: "Routing and webhooks", tables: ["routing_rules", "webhooks", "webhook_deliveries"] },
{ id: "assistant", label: "Assistant and AI usage", tables: ["mailbox_agent_settings", "agent_conversations", "agent_chat_messages", "agent_jobs", "agent_draft_metadata", "agent_send_approvals", "ai_usage"] },
diff --git a/src/lib/backups/types.d.ts b/src/lib/backups/types.d.ts
index 0b7f436..cfcd2f5 100644
--- a/src/lib/backups/types.d.ts
+++ b/src/lib/backups/types.d.ts
@@ -1,6 +1,6 @@
export type BackupScheduleType = "daily" | "weekly" | "monthly";
export type BackupTableGroupId = "accounts" | "mail" | "automation" | "assistant" | "drive" | "system";
-export type DatabaseBackupTable = "users" | "domains" | "domain_tracking_hosts" | "mailboxes" | "mailbox_access" | "contacts" | "folders" | "api_keys" | "messages" | "message_attachments" | "shared_attachment_links" | "outbound_jobs" | "message_tracking" | "message_opens" | "follow_ups" | "routing_rules" | "webhooks" | "webhook_deliveries" | "sessions" | "audit_logs" | "backup_settings" | "backups" | "app_settings" | "license_settings" | "email_templates" | "calendar_events" | "booking_events" | "auto_reply_deliveries" | "spam_token_stats" | "spam_reputation" | "spam_feedback" | "mailbox_aliases" | "password_reset_tokens" | "mfa_recovery_codes" | "login_challenges" | "mailbox_agent_settings" | "agent_conversations" | "agent_chat_messages" | "agent_jobs" | "agent_draft_metadata" | "agent_send_approvals" | "mcp_key_mailboxes" | "ai_usage" | "drive_items" | "drive_upload_parts" | "drive_shares";
+export type DatabaseBackupTable = "users" | "domains" | "domain_tracking_hosts" | "mailboxes" | "mailbox_access" | "contacts" | "folders" | "api_keys" | "messages" | "message_attachments" | "shared_attachment_links" | "outbound_jobs" | "message_tracking" | "message_opens" | "follow_ups" | "user_compose_preferences" | "routing_rules" | "webhooks" | "webhook_deliveries" | "sessions" | "audit_logs" | "backup_settings" | "backups" | "app_settings" | "license_settings" | "email_templates" | "calendar_events" | "booking_events" | "auto_reply_deliveries" | "spam_token_stats" | "spam_reputation" | "spam_feedback" | "mailbox_aliases" | "password_reset_tokens" | "mfa_recovery_codes" | "login_challenges" | "mailbox_agent_settings" | "agent_conversations" | "agent_chat_messages" | "agent_jobs" | "agent_draft_metadata" | "agent_send_approvals" | "mcp_key_mailboxes" | "ai_usage" | "drive_items" | "drive_upload_parts" | "drive_shares";
export type DatabaseRecord = Record<string, string | number | null>;
export type DatabaseBackupDocument = { format: "mailflare-database-backup"; version: 1 | 2; createdAt: string; includedTables?: DatabaseBackupTable[]; tables: Partial<Record<DatabaseBackupTable, DatabaseRecord[]>>; };
diff --git a/src/lib/compose/preferences.ts b/src/lib/compose/preferences.ts
new file mode 100644
index 0000000..6716458
--- /dev/null
+++ b/src/lib/compose/preferences.ts
@@ -0,0 +1,42 @@
+import { eq } from "drizzle-orm";
+import { getDb } from "@/db";
+import { userComposePreferences } from "@/db/schema";
+import { isMissingTableError } from "@/lib/database-errors";
+import type { ComposePreferences } from "./types";
+
+const DEFAULTS: ComposePreferences = { trackOpensDefault: false };
+
+export class ComposePreferencesUnavailableError extends Error {
+ constructor() {
+ super("Apply pending database migrations first");
+ }
+}
+
+/** The user's composer defaults; before migration 0072 everyone gets the defaults. */
+export async function getComposePreferences(env: CloudflareEnv, userId: string): Promise<ComposePreferences> {
+ try {
+ const [row] = await getDb(env)
+ .select({ trackOpensDefault: userComposePreferences.trackOpensDefault })
+ .from(userComposePreferences)
+ .where(eq(userComposePreferences.userId, userId))
+ .limit(1);
+ return row ?? DEFAULTS;
+ } catch (error) {
+ if (isMissingTableError(error)) return DEFAULTS;
+ throw error;
+ }
+}
+
+export async function setComposePreferences(env: CloudflareEnv, userId: string, preferences: ComposePreferences): Promise<ComposePreferences> {
+ const values = { trackOpensDefault: preferences.trackOpensDefault, updatedAt: new Date() };
+ try {
+ await getDb(env)
+ .insert(userComposePreferences)
+ .values({ userId, ...values })
+ .onConflictDoUpdate({ target: userComposePreferences.userId, set: values });
+ } catch (error) {
+ if (isMissingTableError(error)) throw new ComposePreferencesUnavailableError();
+ throw error;
+ }
+ return { trackOpensDefault: preferences.trackOpensDefault };
+}
diff --git a/src/lib/compose/types.d.ts b/src/lib/compose/types.d.ts
new file mode 100644
index 0000000..cd2eb13
--- /dev/null
+++ b/src/lib/compose/types.d.ts
@@ -0,0 +1,4 @@
+export type ComposePreferences = {
+ /** New messages start with the read-receipt pixel on. */
+ trackOpensDefault: boolean;
+};
diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json
index 0451d4d..c18a366 100644
--- a/src/lib/i18n/en.json
+++ b/src/lib/i18n/en.json
@@ -738,6 +738,12 @@
"settingsPage.inbox.threadingDescription": "Choose how emails are organized in your inbox.",
"settingsPage.inbox.addresses": "Addresses",
"settingsPage.inbox.addressesDescription": "Choose how recipient addresses appear when you read mail.",
+ "settingsPage.inbox.compose": "Compose",
+ "settingsPage.inbox.composeDescription": "Defaults for new messages. Each message can still change them in the composer.",
+ "settings.compose.trackOpensTitle": "Read receipts on by default",
+ "settings.compose.trackOpensDescription": "New messages start with the eye switched on. Recipients' mail apps may still block the image.",
+ "settings.compose.failed": "Composer settings could not be saved.",
+ "settings.compose.migrationRequired": "Run “Update database” in Admin first.",
"settingsPage.inbox.shortcuts": "Shortcuts",
"settingsPage.inbox.shortcutsDescription": "Choose whether keyboard shortcuts are active.",
"settingsPage.inbox.notifications": "Notifications",
diff --git a/tests/compose-preferences.test.mjs b/tests/compose-preferences.test.mjs
new file mode 100644
index 0000000..511d61d
--- /dev/null
+++ b/tests/compose-preferences.test.mjs
@@ -0,0 +1,64 @@
+import assert from "node:assert/strict";
+import { mkdtempSync, rmSync } from "node:fs";
+import { dirname, join } from "node:path";
+import test, { after } from "node:test";
+import { fileURLToPath, pathToFileURL } from "node:url";
+import { build } from "esbuild";
+
+const root = join(dirname(fileURLToPath(import.meta.url)), "..");
+const outDir = mkdtempSync(join(root, "tests", ".tmp-compose-preferences-"));
+after(() => rmSync(outDir, { recursive: true, force: true }));
+
+await build({
+ entryPoints: {
+ service: join(root, "src/lib/compose/preferences.ts"),
+ database: join(root, "server/runtime/sqlite-database.ts"),
+ migrate: join(root, "server/runtime/migrate.ts"),
+ },
+ outdir: outDir,
+ outExtension: { ".js": ".mjs" },
+ bundle: true,
+ platform: "node",
+ format: "esm",
+ target: "node22",
+ tsconfig: join(root, "tsconfig.json"),
+ external: ["better-sqlite3", "drizzle-orm", "drizzle-orm/*"],
+ logLevel: "silent",
+});
+
+const load = (name) => import(pathToFileURL(join(outDir, `${name}.mjs`)).href);
+const service = await load("service");
+const { SqliteDatabase } = await load("database");
+const { applyMigrations } = await load("migrate");
+
+async function createFixture(t, { dropTable = false } = {}) {
+ const database = new SqliteDatabase(join(outDir, `${crypto.randomUUID()}.sqlite`));
+ t.after(() => database.db.close());
+ await applyMigrations(database, join(root, "drizzle/migrations"));
+ if (dropTable) database.db.exec("DROP TABLE user_compose_preferences");
+ database.db.prepare("INSERT INTO users (id, email, name, password_hash, created_at) VALUES ('u1', '[email protected]', 'Kevin', 'x', 0)").run();
+ return { env: { DB: database }, database };
+}
+
+test("read receipts default to off and the saved choice persists per user", async (t) => {
+ const { env } = await createFixture(t);
+ assert.deepEqual(await service.getComposePreferences(env, "u1"), { trackOpensDefault: false });
+ await service.setComposePreferences(env, "u1", { trackOpensDefault: true });
+ assert.deepEqual(await service.getComposePreferences(env, "u1"), { trackOpensDefault: true });
+ await service.setComposePreferences(env, "u1", { trackOpensDefault: false });
+ assert.deepEqual(await service.getComposePreferences(env, "u1"), { trackOpensDefault: false });
+});
+
+test("preferences are removed with the user", async (t) => {
+ const { env, database } = await createFixture(t);
+ database.db.exec("PRAGMA foreign_keys = ON");
+ await service.setComposePreferences(env, "u1", { trackOpensDefault: true });
+ database.db.exec("DELETE FROM users WHERE id = 'u1'");
+ assert.equal(database.db.prepare("SELECT count(*) AS n FROM user_compose_preferences").get().n, 0);
+});
+
+test("before migration 0072 reads fall back to off and saving asks for the migration", async (t) => {
+ const { env } = await createFixture(t, { dropTable: true });
+ assert.deepEqual(await service.getComposePreferences(env, "u1"), { trackOpensDefault: false });
+ await assert.rejects(service.setComposePreferences(env, "u1", { trackOpensDefault: true }), service.ComposePreferencesUnavailableError);
+});