emailengine-app 2.80.0 → 2.81.0

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.
Files changed (178) hide show
  1. package/.dockerignore +44 -0
  2. package/.github/docker-smoke-test.sh +16 -0
  3. package/.github/workflows/deploy.yml +4 -0
  4. package/.github/workflows/release.yaml +4 -0
  5. package/.github/workflows/test.yml +2 -0
  6. package/.release-please-manifest.json +1 -1
  7. package/CHANGELOG.md +56 -0
  8. package/Dockerfile +17 -9
  9. package/README.md +6 -0
  10. package/data/google-crawlers.json +1 -1
  11. package/docker-compose.yml +7 -1
  12. package/lib/api-routes/account-routes.js +239 -73
  13. package/lib/api-routes/blocklist-routes.js +24 -0
  14. package/lib/api-routes/delivery-test-routes.js +6 -0
  15. package/lib/api-routes/gateway-routes.js +30 -0
  16. package/lib/api-routes/license-routes.js +10 -0
  17. package/lib/api-routes/mcp-oauth-routes.js +3 -3
  18. package/lib/api-routes/mcp-routes.js +39 -21
  19. package/lib/api-routes/oauth2-app-routes.js +38 -1
  20. package/lib/api-routes/outbox-routes.js +6 -0
  21. package/lib/api-routes/permission-map.js +212 -42
  22. package/lib/api-routes/pubsub-routes.js +8 -0
  23. package/lib/api-routes/route-helpers.js +58 -11
  24. package/lib/api-routes/settings-routes.js +50 -4
  25. package/lib/api-routes/stats-routes.js +6 -0
  26. package/lib/api-routes/template-routes.js +21 -0
  27. package/lib/api-routes/token-routes.js +34 -2
  28. package/lib/api-routes/webhook-route-routes.js +13 -0
  29. package/lib/autodetect-imap-settings.js +4 -4
  30. package/lib/email-client/base-client.js +6 -3
  31. package/lib/email-client/credential-errors.js +4 -0
  32. package/lib/email-client/imap/login-failure.js +52 -0
  33. package/lib/email-client/imap/subconnection.js +2 -1
  34. package/lib/email-client/imap-client.js +3 -6
  35. package/lib/enum-descriptions.js +12 -2
  36. package/lib/imapproxy/imap-server.js +1 -1
  37. package/lib/mcp/oauth.js +46 -8
  38. package/lib/mcp/protocol.js +78 -35
  39. package/lib/mcp/tools.js +53 -17
  40. package/lib/privileged-settings.js +147 -0
  41. package/lib/schemas.js +60 -16
  42. package/lib/sentry.js +13 -2
  43. package/lib/settings.js +13 -0
  44. package/lib/tls/catalog.js +428 -0
  45. package/lib/tls/context.js +87 -161
  46. package/lib/tls/listeners.js +62 -0
  47. package/lib/tls/provision.js +1 -1
  48. package/lib/tls/status.js +128 -79
  49. package/lib/tls/store.js +3 -2
  50. package/lib/token-permission-view.js +253 -102
  51. package/lib/token-permissions.js +176 -26
  52. package/lib/tokens.js +7 -6
  53. package/lib/tools.js +5 -3
  54. package/lib/ui-routes/account-routes.js +195 -61
  55. package/lib/ui-routes/admin-config-routes.js +41 -21
  56. package/lib/ui-routes/admin-entities-routes.js +32 -22
  57. package/lib/ui-routes/mcp-consent-routes.js +72 -31
  58. package/lib/ui-routes/tls-config-routes.js +121 -74
  59. package/package.json +16 -16
  60. package/sbom.json +1 -1
  61. package/server.js +7 -1
  62. package/static/css/flyonui.css +1 -1
  63. package/static/css/public.css +41 -0
  64. package/static/css/src/app.tailwind.css +135 -4
  65. package/static/js/public.js +218 -0
  66. package/static/js/ui.js +89 -36
  67. package/static/licenses.html +55 -37
  68. package/translations/README.md +4 -3
  69. package/translations/de.mo +0 -0
  70. package/translations/de.po +296 -185
  71. package/translations/en.po +220 -128
  72. package/translations/es.mo +0 -0
  73. package/translations/es.po +558 -0
  74. package/translations/et.mo +0 -0
  75. package/translations/et.po +288 -181
  76. package/translations/fr.mo +0 -0
  77. package/translations/fr.po +295 -183
  78. package/translations/it.mo +0 -0
  79. package/translations/it.po +558 -0
  80. package/translations/ja.mo +0 -0
  81. package/translations/ja.po +268 -192
  82. package/translations/locales.json +24 -0
  83. package/translations/messages.pot +179 -127
  84. package/translations/nl.mo +0 -0
  85. package/translations/nl.po +288 -175
  86. package/translations/pl.mo +0 -0
  87. package/translations/pl.po +294 -181
  88. package/translations/sv.mo +0 -0
  89. package/translations/sv.po +555 -0
  90. package/translations/tr.mo +0 -0
  91. package/translations/tr.po +555 -0
  92. package/update-info.sh +12 -6
  93. package/views/account/login-redirect.hbs +6 -5
  94. package/views/account/passkeys.hbs +8 -8
  95. package/views/account/security.hbs +2 -2
  96. package/views/accounts/account.hbs +19 -21
  97. package/views/accounts/browse.hbs +1 -1
  98. package/views/accounts/edit.hbs +15 -15
  99. package/views/accounts/index.hbs +3 -3
  100. package/views/accounts/register/imap-server.hbs +27 -173
  101. package/views/accounts/register/validating.hbs +139 -0
  102. package/views/config/ai.hbs +15 -17
  103. package/views/config/branding.hbs +7 -7
  104. package/views/config/document-store/chat.hbs +9 -8
  105. package/views/config/document-store/index.hbs +14 -15
  106. package/views/config/document-store/mappings/index.hbs +5 -6
  107. package/views/config/document-store/mappings/new.hbs +1 -2
  108. package/views/config/document-store/pre-processing/index.hbs +4 -4
  109. package/views/config/email-processing.hbs +6 -6
  110. package/views/config/imap-proxy.hbs +7 -8
  111. package/views/config/license.hbs +9 -9
  112. package/views/config/logging.hbs +5 -7
  113. package/views/config/mcp.hbs +90 -58
  114. package/views/config/network.hbs +4 -4
  115. package/views/config/oauth/app.hbs +12 -12
  116. package/views/config/oauth/index.hbs +6 -6
  117. package/views/config/oauth/subscriptions.hbs +9 -9
  118. package/views/config/security.hbs +5 -7
  119. package/views/config/service.hbs +11 -10
  120. package/views/config/smtp.hbs +9 -12
  121. package/views/config/tls-upload.hbs +3 -3
  122. package/views/config/tls.hbs +281 -182
  123. package/views/config/webhooks.hbs +12 -15
  124. package/views/dashboard.hbs +9 -8
  125. package/views/gateways/edit.hbs +3 -3
  126. package/views/gateways/gateway.hbs +3 -3
  127. package/views/gateways/index.hbs +6 -6
  128. package/views/gateways/new.hbs +3 -3
  129. package/views/internals/index.hbs +15 -13
  130. package/views/layout/app.hbs +6 -6
  131. package/views/layout/login.hbs +32 -19
  132. package/views/layout/main.hbs +2 -2
  133. package/views/layout/prompt.hbs +15 -18
  134. package/views/layout/public.hbs +1 -1
  135. package/views/mcp/authorize.hbs +47 -45
  136. package/views/partials/accounts_table.hbs +5 -5
  137. package/views/partials/ace_assets.hbs +1 -1
  138. package/views/partials/add_account_modal.hbs +4 -4
  139. package/views/partials/address_list.hbs +4 -4
  140. package/views/partials/filter_editor_js.hbs +2 -2
  141. package/views/partials/gateway_form.hbs +5 -5
  142. package/views/partials/gateway_js.hbs +1 -1
  143. package/views/partials/mcp_access_levels.hbs +16 -9
  144. package/views/partials/mcp_account_limit.hbs +2 -2
  145. package/views/partials/mcp_tool_count.hbs +15 -14
  146. package/views/partials/oauth_config_header.hbs +2 -2
  147. package/views/partials/oauth_form.hbs +37 -42
  148. package/views/partials/public_alerts.hbs +1 -1
  149. package/views/partials/public_test_labels.hbs +15 -0
  150. package/views/partials/public_theme_init.hbs +1 -1
  151. package/views/partials/security_header.hbs +2 -2
  152. package/views/partials/template_form.hbs +4 -4
  153. package/views/partials/theme_init.hbs +1 -1
  154. package/views/partials/tls_security_card.hbs +4 -1
  155. package/views/partials/ui/form-field.hbs +6 -1
  156. package/views/partials/ui/setting-ref.hbs +12 -7
  157. package/views/partials/ui/stat-card.hbs +4 -1
  158. package/views/partials/ui/tabs.hbs +3 -7
  159. package/views/partials/webhook_form.hbs +9 -12
  160. package/views/partials/webhooks_editor_functions.hbs +1 -1
  161. package/views/reference/index.hbs +3 -3
  162. package/views/reference/redirect.hbs +1 -1
  163. package/views/reference/tag.hbs +1 -1
  164. package/views/reference/token.hbs +4 -4
  165. package/views/suppression-lists/index.hbs +8 -6
  166. package/views/suppression-lists/list.hbs +13 -8
  167. package/views/templates/edit.hbs +1 -1
  168. package/views/templates/index.hbs +10 -11
  169. package/views/templates/template.hbs +5 -5
  170. package/views/tokens/index.hbs +17 -17
  171. package/views/tokens/new.hbs +190 -93
  172. package/views/unsubscribe.hbs +1 -1
  173. package/views/webhooks/edit.hbs +1 -1
  174. package/views/webhooks/index.hbs +10 -11
  175. package/views/webhooks/new.hbs +1 -1
  176. package/views/webhooks/webhook.hbs +5 -6
  177. package/workers/api.js +9 -8
  178. package/workers/smtp.js +1 -1
@@ -0,0 +1,139 @@
1
+ {{!-- Hosted authentication form, IMAP path: the checking step.
2
+
3
+ Rendered instead of the server settings page when the setup link was issued
4
+ with skipServerSettings and autodiscovery filled in every field the account
5
+ needs (lib/ui-routes/account-routes.js). The page checks the connection and,
6
+ when it holds, submits the same value set the settings form would have
7
+ submitted - so the visitor goes from "email address and password" straight to
8
+ the calling application. A failed check hands them the settings form after all.
9
+
10
+ The form's action is the settings form, the harmless of its two destinations,
11
+ and JavaScript points it at the account-creating endpoint only once the check
12
+ has passed. That way the no-script path and an interrupted check both land on
13
+ the form rather than creating an account nobody verified. --}}
14
+
15
+ <form method="post" id="setup-form" action="/accounts/new/imap/settings">
16
+ <input type="hidden" name="crumb" value="{{crumb}}">
17
+ <input type="hidden" name="data" value="{{values.data}}">
18
+ <input type="hidden" name="sig" value="{{values.sig}}">
19
+ <input type="hidden" name="email" value="{{values.email}}">
20
+ <input type="hidden" name="name" value="{{values.name}}">
21
+ <input type="hidden" name="tz" value="{{values.tz}}" data-ee-tz>
22
+
23
+ {{!-- The connection fields views/accounts/register/imap-server.hbs renders as controls, so both
24
+ pages reach /accounts/new/imap/server with identical payloads and the create endpoint needs no
25
+ branch of its own. The list comes from the same connectionFields schema that validates the
26
+ submission rather than being written out again here, so a field added there travels with it. --}}
27
+ {{#each connectionFieldNames}}
28
+ <input type="hidden" name="{{this}}" value="{{lookup ../values this}}">
29
+ {{/each}}
30
+
31
+ {{!-- Hidden until the script that drives it runs, so a browser without JavaScript is never
32
+ shown a spinner that will never stop. --}}
33
+ <div class="ee-status" id="checking-panel" hidden>
34
+ <span class="ee-icon ee-icon-loader ee-spin ee-status-icon"></span>
35
+ <h1>{{_ "Checking your mail server" templateLocale }}</h1>
36
+ <p class="ee-muted ee-status-servers">{{values.imap_host}} &middot; {{values.smtp_host}}</p>
37
+
38
+ {{!-- Said once the wait stops looking instant, so it does not start to read as a page that
39
+ has stopped working. --}}
40
+ <p class="ee-muted" id="checking-slow" hidden>{{_ "Still checking. This can take up to a minute."
41
+ templateLocale }}</p>
42
+
43
+ {{!-- The way out, offered later than the reassurance. Until the check finishes there is
44
+ nothing else on this page to press, so a visitor whose mail server never answers needs one -
45
+ but leaving early abandons a check the server keeps running to its own timeout, so this waits
46
+ until most of that budget is gone rather than interrupting a check still likely to answer. --}}
47
+ <p id="checking-escape" hidden><button type="submit" class="ee-btn ee-btn-soft ee-btn-sm">{{_
48
+ "Enter server settings manually" templateLocale }}</button></p>
49
+ </div>
50
+
51
+ <div class="ee-status" id="failed-panel" hidden>
52
+ <span class="ee-icon ee-icon-circle-x ee-status-icon ee-error-text"></span>
53
+ <h1>{{_ "We couldn't sign in to your mail server" templateLocale }}</h1>
54
+ <p class="ee-muted">{{_ "Check the settings on the next page and try again." templateLocale }}</p>
55
+
56
+ <dl class="ee-dl ee-status-errors" id="checking-errors"></dl>
57
+
58
+ <div class="ee-form-actions">
59
+ <button type="submit" class="ee-btn ee-btn-primary">
60
+ <span class="ee-icon ee-icon-arrow-right"></span>
61
+ {{_ "Continue to server settings" templateLocale }}
62
+ </button>
63
+ </div>
64
+ </div>
65
+
66
+ <noscript>
67
+ <div class="ee-status">
68
+ <span class="ee-icon ee-icon-mail ee-status-icon"></span>
69
+ <h1>{{_ "Almost there" templateLocale }}</h1>
70
+ <p class="ee-muted">{{_ "Continue to review your mail server settings." templateLocale }}</p>
71
+ <div class="ee-form-actions">
72
+ <button type="submit" class="ee-btn ee-btn-primary">
73
+ <span class="ee-icon ee-icon-arrow-right"></span>
74
+ {{_ "Continue" templateLocale }}
75
+ </button>
76
+ </div>
77
+ </div>
78
+ </noscript>
79
+ </form>
80
+
81
+ <script data-cfasync="false" nonce="{{cspNonce}}">
82
+ // Reveal the spinner before waiting for DOMContentLoaded - the elements above are already
83
+ // parsed, and the panel is what the visitor should see while the rest of the page loads.
84
+ document.getElementById('checking-panel').hidden = false;
85
+
86
+ document.addEventListener('DOMContentLoaded', () => {
87
+
88
+ let myForm = document.getElementById('setup-form');
89
+ let checkingPanelElm = document.getElementById('checking-panel');
90
+ let slowNoticeElm = document.getElementById('checking-slow');
91
+ let escapeElm = document.getElementById('checking-escape');
92
+ let failedPanelElm = document.getElementById('failed-panel');
93
+ let errorsListElm = document.getElementById('checking-errors');
94
+
95
+ {{!-- The create endpoint claims a single-use nonce, so eeSubmitOnce (static/js/public.js)
96
+ guards the submit this page makes for the visitor. No busy button and no constraint
97
+ validation: there is nothing on this page to press or to fill in. --}}
98
+ let submitForm = eeSubmitOnce(myForm);
99
+
100
+ {{!-- Shared with the server settings page, which renders the same rows into a dialog --}}
101
+ {{> public_test_labels}}
102
+
103
+ let showFailure = (data) => {
104
+ eeRenderTestErrors(errorsListElm, data, TEST_ERROR_LABELS);
105
+ // Carried on the action rather than in a field, the same way the success path retargets
106
+ // the form below: it tells the settings form to open by saying why it is being asked for
107
+ myForm.setAttribute('action', '/accounts/new/imap/settings?checkFailed=1');
108
+ checkingPanelElm.hidden = true;
109
+ failedPanelElm.hidden = false;
110
+ };
111
+
112
+ // A mail server that answers slowly is the usual reason this takes a while. The reassurance
113
+ // comes early; the way out comes late, because taking it abandons a check the server keeps
114
+ // running to its own 30 second timeout.
115
+ let waitTimers = [setTimeout(() => (slowNoticeElm.hidden = false), 8 * 1000), setTimeout(() => (escapeElm.hidden = false), 20 * 1000)];
116
+ let clearWaitTimers = () => waitTimers.forEach(timer => clearTimeout(timer));
117
+
118
+ // The server gives up on a connection after 30 seconds, so the timeout only fires when the
119
+ // request itself never comes back. An aborted check is a failed check - the visitor is
120
+ // handed the settings form rather than left on a spinner.
121
+ eePostConnectionTest(myForm, { timeoutMs: 45 * 1000, requestFailedText: REQUEST_FAILED_TEXT })
122
+ .then(data => {
123
+ clearWaitTimers();
124
+ if (data.imap && data.imap.success && data.smtp && data.smtp.success) {
125
+ // Everything checks out, so this form becomes the settings form's submit: same
126
+ // fields, same endpoint, one step less for the visitor.
127
+ // The attribute, not the property: a control named `action` would shadow it
128
+ myForm.setAttribute('action', '/accounts/new/imap/server');
129
+ submitForm();
130
+ return;
131
+ }
132
+ showFailure(data);
133
+ })
134
+ .catch(err => {
135
+ clearWaitTimers();
136
+ showFailure({ error: err });
137
+ });
138
+ })
139
+ </script>
@@ -1,7 +1,7 @@
1
1
  {{> ui/page-header title="AI Processing" icon="icon-[tabler--robot]" class="mb-1"}}
2
2
 
3
- <p class="mb-6">Process incoming emails with AI to extract insights and enrich your data. EmailEngine sends email
4
- content to OpenAI and adds the AI response to your webhooks.
3
+ <p class="mb-6">Analyze new Inbox emails with AI and include the results in <code>messageNew</code> webhooks.
4
+ EmailEngine sends email content to the AI provider configured below.
5
5
  </p>
6
6
 
7
7
  {{> ui/env-managed-alert}}
@@ -29,14 +29,14 @@
29
29
  </div>
30
30
  {{/if}}
31
31
 
32
- <div class="px-6 py-4 border-b border-base-content/10 flex items-start justify-between gap-4">
32
+ <div class="px-6 py-4 border-b border-base-content/10 ee-toggle-row flex items-start justify-between gap-4">
33
33
  <div>
34
34
  {{#> ui/checkbox id="generateEmailSummary" label="Enable AI Email Processing"
35
35
  checked=values.generateEmailSummary error=errors.generateEmailSummary}}
36
36
  {{#> ui/tooltip-rich icon="icon-[tabler--info-circle]"}}
37
37
  <strong>Privacy Notice</strong><br>
38
- Email text is sent to OpenAI's servers for processing. While OpenAI doesn't use this data for
39
- training, ensure this aligns with your privacy policies and user agreements.
38
+ Email content is sent to the configured AI provider. Review that provider's data handling terms
39
+ before enabling processing.
40
40
  {{/ui/tooltip-rich}}
41
41
  {{/ui/checkbox}}
42
42
  <span class="helper-text">Process new emails with AI and include the results in
@@ -60,7 +60,7 @@
60
60
  {{#> ui/form-field id="openAiAPIKey" label="API Key" error=errors.openAiAPIKey}}
61
61
  {{> ui/secret-field id="openAiAPIKey" value=values.openAiAPIKey error=errors.openAiAPIKey
62
62
  toggleId="showOpenAiAPIKey" toggleLabel="Show API key" placeholder=(when hasOpenAiAPIKey "Key is set (hidden for security)")}}
63
- <span class="helper-text">Your OpenAI API key for authentication.</span>
63
+ <span class="helper-text">API key for the AI provider configured below.</span>
64
64
  {{/ui/form-field}}
65
65
  </div>
66
66
 
@@ -70,7 +70,7 @@
70
70
  <div class="flex items-center gap-2">
71
71
  <label class="label-text" for="settingsServiceOpenAiModel">AI Model</label>
72
72
 
73
- {{> ui/btn label="Refresh Models" style="text" size="sm" id="reload-models-btn"
73
+ {{> ui/btn label="Refresh models" style="text" size="sm" id="reload-models-btn"
74
74
  icon="icon-[tabler--refresh] reload-icon"}}
75
75
  </div>
76
76
 
@@ -200,7 +200,7 @@
200
200
  {{/ui/card}}
201
201
 
202
202
  <div id="prompt_settings" class="card bg-base-100 shadow-md mb-6">
203
- <div class="card-header flex items-center justify-between">
203
+ <div class="card-header flex flex-wrap items-center justify-between gap-3">
204
204
  <h6 class="card-title text-primary">AI Instructions</h6>
205
205
  {{> ui/btn label="Reset to default" variant="neutral" style="soft" size="sm"
206
206
  icon="icon-[tabler--arrow-back-up]" id="prompt-reset-btn"}}
@@ -258,15 +258,13 @@
258
258
 
259
259
  <div>
260
260
  {{> ui/setting-ref name="openAiMaxTokens"}}
261
- {{#> ui/form-field id="settingsOpenAiMaxTokens" label="Max Tokens" error=errors.openAiMaxTokens}}
261
+ {{#> ui/form-field id="settingsOpenAiMaxTokens" label="Input token limit" error=errors.openAiMaxTokens}}
262
262
  <input type="number" class="input text-list{{#if errors.openAiMaxTokens}} is-invalid{{/if}}"
263
263
  id="settingsOpenAiMaxTokens" step="1" min="0" name="openAiMaxTokens"
264
264
  value="{{values.openAiMaxTokens}}" />
265
- <span class="helper-text">Maximum tokens limit for OpenAI API requests. EmailEngine composes the full
266
- prompt from: the user prompt text (above), system prompt describing the AI role, JSON schema
267
- definition, and the structured email data. If the combined prompt exceeds this limit, EmailEngine
268
- automatically shortens the email content until it fits. Defaults: GPT-5: 18000, GPT-4: 6500,
269
- GPT-3.5: 3000.</span>
265
+ <span class="helper-text">Maximum tokens in the input prompt, including your instructions, the system prompt, the JSON schema,
266
+ and email data. EmailEngine shortens the email content to fit this limit. Leave blank for
267
+ EmailEngine's model-based default.</span>
270
268
  {{/ui/form-field}}
271
269
  </div>
272
270
 
@@ -274,7 +272,7 @@
274
272
  </div>
275
273
 
276
274
  <div class="mb-6">
277
- {{> ui/btn label="Save Changes" type="submit" icon="icon-[tabler--settings]"}}
275
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--settings]"}}
278
276
  </div>
279
277
 
280
278
  </form>
@@ -299,7 +297,7 @@
299
297
  {{> ui/btn label="Close" variant="neutral" style="soft" overlay="#testPromptModal"}}
300
298
  <button type="button" id="prompt-test-btn" class="btn btn-primary">
301
299
  <span class="icon-[tabler--flask] size-4" id="prompt-test-btn-icon"></span>
302
- Choose File and Test
300
+ Choose file and test
303
301
  </button>
304
302
 
305
303
  </div>
@@ -311,7 +309,7 @@ defaultTestPayload='{"account":"test","path":"INBOX","subject":"test email"}'}}
311
309
 
312
310
  <input type="hidden" id="defaultPromptJson" value="{{defaultPromptJson}}">
313
311
 
314
- <script nonce="{{cspNonce}}">
312
+ <script data-cfasync="false" nonce="{{cspNonce}}">
315
313
  document.addEventListener('DOMContentLoaded', () => {
316
314
 
317
315
  const editorPrompt = uiAceEditor("editor-prompt", "markdown", document.getElementById('openAiPromptElement').value, {
@@ -1,6 +1,6 @@
1
1
  {{> ui/page-header title="Branding" icon="icon-[tabler--palette]" class="mb-1"}}
2
2
 
3
- <p class="mb-6">Customize public pages like authentication forms, error pages, and unsubscribe pages.</p>
3
+ <p class="mb-6">Add your branding to public pages, including authentication forms, error pages, and unsubscribe pages.</p>
4
4
 
5
5
  {{> ui/env-managed-alert}}
6
6
 
@@ -9,7 +9,7 @@
9
9
  <input type="hidden" name="crumb" value="{{crumb}}" />
10
10
 
11
11
  <div id="templates_settings" class="card bg-base-100 shadow-md mb-6">
12
- <div class="card-header flex items-center justify-between">
12
+ <div class="card-header flex flex-wrap items-center justify-between gap-3">
13
13
  <h6 class="card-title text-primary">Public Page Customization</h6>
14
14
  {{> ui/btn label="Preview" variant="neutral" style="soft" size="sm" icon="icon-[tabler--eye]"
15
15
  id="preview-header-btn"}}
@@ -22,7 +22,7 @@
22
22
  <input type="text" class="input{{#if errors.pageBrandName}} is-invalid{{/if}}"
23
23
  id="settingsPageBrandName" name="pageBrandName" value="{{values.pageBrandName}}"
24
24
  data-lpignore="true" autocomplete="off" placeholder="EmailEngine" />
25
- <span class="helper-text">Appears in browser title bar</span>
25
+ <span class="helper-text">Shown in the browser tab title.</span>
26
26
  {{/ui/form-field}}
27
27
  </div>
28
28
 
@@ -58,14 +58,14 @@
58
58
  <span class="helper-text text-error">{{errors.templateHtmlHead}}</span>
59
59
  {{/if}}
60
60
 
61
- <span class="helper-text">Add custom CSS, fonts, or analytics scripts</span>
61
+ <span class="helper-text">Add custom CSS, fonts, or analytics scripts to public pages.</span>
62
62
  </div>
63
63
 
64
64
  </div>
65
65
  </div>
66
66
 
67
67
  <div class="mb-6">
68
- {{> ui/btn label="Save Changes" type="submit" icon="icon-[tabler--settings]"}}
68
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--settings]"}}
69
69
  </div>
70
70
 
71
71
  </form>
@@ -79,9 +79,9 @@
79
79
 
80
80
 
81
81
  {{> ace_assets}}
82
- <script src="/static/js/ace/ext-language_tools.js"></script>
82
+ <script data-cfasync="false" src="/static/js/ace/ext-language_tools.js"></script>
83
83
 
84
- <script nonce="{{cspNonce}}">
84
+ <script data-cfasync="false" nonce="{{cspNonce}}">
85
85
  document.addEventListener('DOMContentLoaded', () => {
86
86
 
87
87
  const editors = new Map();
@@ -6,7 +6,7 @@
6
6
 
7
7
  <div class="card bg-base-100 shadow-md mb-6">
8
8
 
9
- <div class="px-6 py-4 border-b border-base-content/10 flex items-start justify-between gap-4">
9
+ <div class="px-6 py-4 border-b border-base-content/10 ee-toggle-row flex items-start justify-between gap-4">
10
10
 
11
11
  <div>
12
12
  <div class="flex items-center gap-2">
@@ -17,7 +17,7 @@
17
17
  <label class="label-text p-0" for="documentStoreGenerateEmbeddings">Enable the "Chat with emails"
18
18
  feature</label>
19
19
 
20
- {{#> ui/tooltip text="Requires ElasticSearch 8.8.0+"}}<span
20
+ {{#> ui/tooltip text="Requires Elasticsearch 8.8.0+"}}<span
21
21
  class="icon-[tabler--info-circle] size-4 text-base-content/50"></span>{{/ui/tooltip}}
22
22
 
23
23
  {{#unless documentStoreEnabled}}
@@ -37,7 +37,7 @@
37
37
  class="link link-animated">Chat API method</a>.</span>
38
38
  <div class="mt-2"><small><strong>Important:</strong> EmailEngine will only create embeddings for emails
39
39
  processed when the feature is active. To generate embeddings for previously stored emails,
40
- utilize the <a href="/admin/reference/account#putV1AccountAccountFlush" target="_blank"
40
+ use the <a href="/admin/reference/account#putV1AccountAccountFlush" target="_blank"
41
41
  rel="noopener noreferrer" class="link link-animated">Flush API method</a>. This will force
42
42
  EmailEngine to re-process all emails in the Document Store.</small>
43
43
  </div>
@@ -49,7 +49,8 @@
49
49
  <div class="text-end flex flex-col justify-between gap-2">
50
50
 
51
51
  <div class="space-y-1">
52
- {{> ui/setting-ref name="documentStoreGenerateEmbeddings" class="whitespace-nowrap"}}
52
+ {{!-- nofloat: stacked reference column, like the two entries under it --}}
53
+ {{> ui/setting-ref name="documentStoreGenerateEmbeddings" nofloat=true class="whitespace-nowrap"}}
53
54
 
54
55
  {{> ui/setting-ref name="Chat with emails" href="/admin/reference/deprecated-endpoints-document-store#postV1ChatAccount"
55
56
  nofloat=true class="whitespace-nowrap"}}
@@ -116,7 +117,7 @@
116
117
 
117
118
 
118
119
  <div class="mb-6">
119
- {{> ui/btn label="Update settings" type="submit" icon="icon-[tabler--settings]"}}
120
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--settings]"}}
120
121
  </div>
121
122
 
122
123
  </form>
@@ -129,7 +130,7 @@
129
130
  {{#> ui/form-field id="inputAccount" label="Account ID"}}
130
131
  <input type="text" class="input" name="account" id="inputAccount" aria-describedby="inputAccountHelp"
131
132
  value="" required>
132
- <span class="helper-text">The account ID to send the chat message as.</span>
133
+ <span class="helper-text">ID of the account whose emails you want to search.</span>
133
134
  {{/ui/form-field}}
134
135
  </div>
135
136
 
@@ -137,7 +138,7 @@
137
138
  {{#> ui/form-field id="question" label="Question"}}
138
139
  <input type="text" class="input" name="question" id="question" aria-describedby="questionHelp" value=""
139
140
  required>
140
- <span class="helper-text">Question to ask about the emails on the account.</span>
141
+ <span class="helper-text">Ask a question about this account's stored emails.</span>
141
142
  {{/ui/form-field}}
142
143
  </div>
143
144
 
@@ -171,7 +172,7 @@
171
172
  </form>
172
173
  {{/ui/modal}}
173
174
 
174
- <script nonce="{{cspNonce}}">
175
+ <script data-cfasync="false" nonce="{{cspNonce}}">
175
176
  document.addEventListener('DOMContentLoaded', () => {
176
177
 
177
178
  const sendQuestionPayload = async () => {
@@ -2,10 +2,9 @@
2
2
 
3
3
  {{#> ui/stat-card variant="warning" icon="icon-[tabler--alert-triangle]" class="mb-6"}}
4
4
  <ul class="list-disc ps-6">
5
- <li>The Document Store backend only supports ElasticSearch v8+. Older ElasticSearch versions and
5
+ <li>The Document Store backend only supports Elasticsearch v8+. Older Elasticsearch versions and
6
6
  other alternatives like OpenSearch aren't compatible.</li>
7
- <li>EmailEngine syncs emails to the Document Store based on a "best effort" approach, meaning there
8
- might be occasional missed data.</li>
7
+ <li>Syncing uses a best-effort process, so the Document Store may not contain every mailbox change.</li>
9
8
  <li>Email attachments won't be saved in the Document Store.</li>
10
9
  <li>To index accounts, turn on the Document Store feature first. If it's off, any processed emails
11
10
  won't sync to the Document Store. You can force EmailEngine to resync all emails for an account
@@ -24,18 +23,18 @@
24
23
  <input type="hidden" name="crumb" value="{{crumb}}" />
25
24
 
26
25
  <div class="card bg-base-100 shadow-md mb-6">
27
- <div class="card-header flex items-center justify-between">
26
+ <div class="card-header flex flex-wrap items-center justify-between gap-3">
28
27
  <h6 class="card-title text-primary">General settings</h6>
29
28
  {{> ui/btn label="Test connection" variant="info" style="soft" size="sm" icon="icon-[tabler--link]"
30
29
  id="test-payload-btn"}}
31
30
  </div>
32
31
 
33
- <div class="px-6 py-4 border-b border-base-content/10 flex items-start justify-between gap-4">
32
+ <div class="px-6 py-4 border-b border-base-content/10 ee-toggle-row flex items-start justify-between gap-4">
34
33
  <div>
35
34
  {{> ui/checkbox id="documentStoreEnabled" name="documentStoreEnabled"
36
- label="Enable syncing to the Document Store." checked=values.documentStoreEnabled
35
+ label="Enable syncing to the Document Store" checked=values.documentStoreEnabled
37
36
  error=errors.documentStoreEnabled
38
- hint="If enabled, then EmailEngine stores structured email content to ElasticSearch. Stored data does include attachment metadata but not attachment contents."}}
37
+ hint="Store structured email content in Elasticsearch, including attachment metadata but not attachment contents."}}
39
38
 
40
39
  <div class="mt-2"><small><strong>Important:</strong> EmailEngine only saves emails to the Document
41
40
  Store if processed while the feature is active. To add existing emails, use the <a
@@ -46,11 +45,11 @@
46
45
  </div>
47
46
 
48
47
  <div class="text-end space-y-1">
49
- {{> ui/setting-ref name="documentStoreEnabled" class="whitespace-nowrap"}}
48
+ {{!-- nofloat: this is a stacked reference column, and a floated first entry collides with the block under it --}}
49
+ {{> ui/setting-ref name="documentStoreEnabled" nofloat=true class="whitespace-nowrap"}}
50
50
 
51
- <div class="text-base-content/60 code-link whitespace-nowrap">[<a
52
- href="/admin/reference/account#putV1AccountAccountFlush" target="_blank"
53
- rel="noopener noreferrer" class="link link-animated">Request&nbsp;account&nbsp;flush</a>]</div>
51
+ {{> ui/setting-ref name="Request account flush" href="/admin/reference/account#putV1AccountAccountFlush"
52
+ nofloat=true class="whitespace-nowrap"}}
54
53
 
55
54
  {{#if values.documentStoreEnabled}}
56
55
  {{> ui/badge label="enabled" variant="success"}}
@@ -64,10 +63,10 @@
64
63
 
65
64
  <div>
66
65
  {{> ui/setting-ref name="documentStoreUrl"}}
67
- {{#> ui/form-field id="documentStoreUrl" label="URL to ElasticSearch" error=errors.documentStoreUrl}}
66
+ {{#> ui/form-field id="documentStoreUrl" label="URL to Elasticsearch" error=errors.documentStoreUrl}}
68
67
  <input type="url" class="input trigger-example-render{{#if errors.documentStoreUrl}} is-invalid{{/if}}"
69
68
  id="documentStoreUrl" name="documentStoreUrl" value="{{values.documentStoreUrl}}">
70
- <span class="helper-text">URL to ElasticSearch API, for example "http://localhost:9200".</span>
69
+ <span class="helper-text">URL to Elasticsearch API, for example "http://localhost:9200".</span>
71
70
  {{/ui/form-field}}
72
71
  </div>
73
72
 
@@ -111,12 +110,12 @@
111
110
  </div>
112
111
 
113
112
  <div class="mb-6">
114
- {{> ui/btn label="Update settings" type="submit" icon="icon-[tabler--settings]"}}
113
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--settings]"}}
115
114
  </div>
116
115
 
117
116
  </form>
118
117
 
119
- <script nonce="{{cspNonce}}">
118
+ <script data-cfasync="false" nonce="{{cspNonce}}">
120
119
  document.addEventListener('DOMContentLoaded', () => {
121
120
 
122
121
  const sendTestPayload = async () => {
@@ -2,16 +2,15 @@
2
2
 
3
3
  {{#> ui/stat-card variant="info" icon="icon-[tabler--alert-circle]" class="mb-6"}}
4
4
  <div class="mb-2">
5
- You can create custom field type mappings for emails saved in ElasticSearch. While EmailEngine
5
+ You can create custom field type mappings for emails saved in Elasticsearch. While EmailEngine
6
6
  automatically maps types for its default fields, it doesn't do this for custom fields you've added
7
- using the Document Store's pre-processing functions. Oftentimes, relying on ElasticSearch's
8
- automatic type detection works well, but not always.
7
+ using the Document Store's pre-processing functions. Define a mapping when Elasticsearch's automatic type detection does not match your data.
9
8
  </div>
10
9
  <div>
11
10
  <strong>Important:</strong> Once you've set a field mapping, you can't change it without migrating
12
- the entire index. This also holds true for fields that ElasticSearch has auto-mapped. If
13
- ElasticSearch sets a type for a field automatically, you won't be able to change that type later.
14
- Make sure to set your desired mappings before saving data to ElasticSearch.
11
+ the entire index. This also holds true for fields that Elasticsearch has auto-mapped. If
12
+ Elasticsearch sets a type for a field automatically, you won't be able to change that type later.
13
+ Make sure to set your desired mappings before saving data to Elasticsearch.
15
14
  </div>
16
15
  {{/ui/stat-card}}
17
16
 
@@ -57,8 +57,7 @@ midHref="/admin/config/document-store/mappings" midLabel="Field mappings" curren
57
57
 
58
58
  {{#> ui/modal id="submitModal" title="Add mapping" titleId="submitModalLabel"}}
59
59
  <div class="modal-body">
60
- <p>Are you sure you want to add this mapping? You would have to reindex everything to delete or
61
- modify an existing mapping.</p>
60
+ <p>Add this field mapping? Changing or deleting it later requires reindexing all stored documents.</p>
62
61
  </div>
63
62
  <div class="modal-footer">
64
63
  {{> ui/btn label="Close" variant="neutral" style="soft" overlay="#submitModal"}}
@@ -8,11 +8,11 @@
8
8
  <input type="hidden" id="map-content-element" name="contentMapJson" value="{{values.contentMapJson}}">
9
9
 
10
10
  <div class="card bg-base-100 shadow-md mb-6">
11
- <div class="px-6 py-4 border-b border-base-content/10 flex items-start justify-between gap-4">
11
+ <div class="px-6 py-4 border-b border-base-content/10 ee-toggle-row flex items-start justify-between gap-4">
12
12
  <div>
13
- {{> ui/checkbox id="enabled" name="enabled" label="Enable pre-processing."
13
+ {{> ui/checkbox id="enabled" name="enabled" label="Enable pre-processing"
14
14
  checked=values.enabled error=errors.enabled
15
- hint="The Document Store Pre-processing feature lets you edit emails before saving them. Additionally, you can exclude certain emails from being stored altogether."}}
15
+ hint="Filter emails and transform their data before saving them to the Document Store."}}
16
16
  </div>
17
17
 
18
18
  <div class="text-end space-y-1">
@@ -96,7 +96,7 @@
96
96
  </div>
97
97
 
98
98
  <div class="mb-6">
99
- {{> ui/btn label="Update settings" type="submit" icon="icon-[tabler--settings]"}}
99
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--settings]"}}
100
100
  </div>
101
101
  </form>
102
102
 
@@ -11,11 +11,11 @@
11
11
  {{#> ui/card title="Email Delivery" id="submission_settings"}}
12
12
  <div>
13
13
  {{> ui/setting-ref name="deliveryAttempts"}}
14
- {{#> ui/form-field id="settingsDeliveryAttempts" label="Retry Attempts" error=errors.deliveryAttempts}}
14
+ {{#> ui/form-field id="settingsDeliveryAttempts" label="Delivery attempts" error=errors.deliveryAttempts}}
15
15
  <input type="number" min="0" class="input{{#if errors.deliveryAttempts}} is-invalid{{/if}}"
16
16
  id="settingsDeliveryAttempts" name="deliveryAttempts" value="{{values.deliveryAttempts}}"
17
17
  data-lpignore="true" autocomplete="off" />
18
- <span class="helper-text">How many times to retry failed email deliveries.</span>
18
+ <span class="helper-text">Maximum delivery attempts per email, including the first attempt.</span>
19
19
  {{/ui/form-field}}
20
20
  </div>
21
21
 
@@ -31,8 +31,8 @@
31
31
  <option value="{{id}}" {{#if selected}}selected{{/if}}>{{name}}</option>
32
32
  {{/each}}
33
33
  </select>
34
- <span class="helper-text"><strong>Full:</strong> Track all changes (new, deleted, updated emails).
35
- <strong>Fast:</strong> Track only new emails. Applies to new accounts only. To change existing
34
+ <span class="helper-text"><strong>Full:</strong> Track new, deleted, and updated emails.
35
+ <strong>Fast:</strong> Track only new emails. This setting applies to new accounts. To change existing
36
36
  accounts, perform an <a href="/admin/reference/account#putV1AccountAccountFlush"
37
37
  class="link link-animated">account flush</a>.</span>
38
38
  {{/ui/form-field}}
@@ -77,7 +77,7 @@
77
77
  label="Detect Gmail Categories (IMAP)" checked=values.resolveGmailCategories
78
78
  error=errors.resolveGmailCategories}}
79
79
  <span class="helper-text">Identify which Gmail tab (Primary, Social, Promotions, Updates, Forums) new
80
- emails belong to. Available in <code>messageNew</code> webhook as <code>category</code> property.
80
+ emails belong to. Included as the <code>category</code> property in <code>messageNew</code> webhooks.
81
81
  Gmail API accounts get this automatically.</span>
82
82
  </div>
83
83
 
@@ -114,7 +114,7 @@
114
114
  {{/ui/card}}
115
115
 
116
116
  <div class="mb-6">
117
- {{> ui/btn label="Save Changes" type="submit" icon="icon-[tabler--settings]"}}
117
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--settings]"}}
118
118
  </div>
119
119
 
120
120
  </form>
@@ -2,14 +2,14 @@
2
2
  tooltip through the /admin/changes SSE feed (targets .state-info[data-type]) --}}
3
3
  {{> ui/page-header title="IMAP Proxy" icon="icon-[tabler--server]" stateLabel=serverState.label stateType="imapProxy" class="mb-1"}}
4
4
 
5
- <p>Access any EmailEngine-managed account through standard IMAP clients. The proxy handles authentication with the real
6
- email server, so your IMAP client only needs an access token-no actual credentials or OAuth2 setup required.</p>
5
+ <p>Connect an IMAP client to an account managed by EmailEngine. The proxy authenticates with the email server
6
+ using the account's stored credentials. Your client signs in with an access token or the global password.</p>
7
7
 
8
8
  <div class="alert alert-soft alert-info mb-6">
9
9
  <span class="icon-[tabler--info-circle] size-5 shrink-0"></span>
10
10
  <span><strong>Compatibility Note:</strong> IMAP proxy only works with accounts that
11
11
  connect via IMAP protocol. This includes Gmail and Microsoft 365 accounts using OAuth2 authentication with IMAP
12
- access. Accounts using MS Graph API or Gmail API as their mail backend are not supported through the
12
+ access. Accounts using Microsoft Graph or Gmail API as their mail backend are not supported through the
13
13
  proxy.</span>
14
14
  </div>
15
15
 
@@ -26,7 +26,7 @@
26
26
  <h6 class="card-title text-primary">Server Configuration</h6>
27
27
  </div>
28
28
 
29
- <div class="px-6 py-4 border-b border-base-content/10 flex items-start justify-between gap-4">
29
+ <div class="px-6 py-4 border-b border-base-content/10 ee-toggle-row flex items-start justify-between gap-4">
30
30
  {{> ui/checkbox id="imapProxyServerEnabled" name="imapProxyServerEnabled" label="Enable IMAP Proxy"
31
31
  checked=values.imapProxyServerEnabled error=errors.imapProxyServerEnabled}}
32
32
 
@@ -54,8 +54,7 @@
54
54
  class="input basicAutoComplete trigger-example-render{{#if errors.imapProxyServerHost}} is-invalid{{/if}}"
55
55
  id="imapProxyServerHost" name="imapProxyServerHost" value="{{values.imapProxyServerHost}}"
56
56
  data-lpignore="true" autocomplete="off" />
57
- <span class="helper-text">IP address to bind to. Use "0.0.0.0" or leave empty to accept connections from
58
- anywhere.</span>
57
+ <span class="helper-text">IP address the proxy listens on. Use "0.0.0.0" or leave blank to listen on all IPv4 interfaces.</span>
59
58
  {{/ui/form-field}}
60
59
  </div>
61
60
 
@@ -131,7 +130,7 @@
131
130
  {{/ui/details}}
132
131
 
133
132
  <div class="mb-6">
134
- {{> ui/btn label="Save Changes" type="submit" icon="icon-[tabler--settings]"}}
133
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--settings]"}}
135
134
  </div>
136
135
 
137
136
  </form>
@@ -139,7 +138,7 @@
139
138
 
140
139
  <input type="hidden" id="availableAddresses" value="{{availableAddresses}}">
141
140
 
142
- <script nonce="{{cspNonce}}">
141
+ <script data-cfasync="false" nonce="{{cspNonce}}">
143
142
  document.addEventListener('DOMContentLoaded', () => {
144
143
 
145
144
  let availableAddresses = document.getElementById('availableAddresses').value.split(',').map(e => e.trim()).filter(e => e);