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
@@ -55,7 +55,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
55
55
  {{#> ui/form-field id="name" label="Application name" error=errors.name}}
56
56
  <input type="text" class="input{{#if errors.name}} is-invalid{{/if}}" id="name" name="name"
57
57
  value="{{values.name}}" placeholder="Enter application name, eg. &quot;My App&quot;&mldr;" required />
58
- <span class="helper-text">Application name used when listing apps.</span>
58
+ <span class="helper-text">Name shown in the OAuth2 app list.</span>
59
59
  {{/ui/form-field}}
60
60
  </div>
61
61
 
@@ -63,7 +63,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
63
63
  {{#> ui/form-field id="description" label="Description" error=errors.description}}
64
64
  <input type="text" class="input{{#if errors.description}} is-invalid{{/if}}" id="description"
65
65
  name="description" value="{{values.description}}" placeholder="" />
66
- <span class="helper-text">Optional application description or a comment.</span>
66
+ <span class="helper-text">Describe what this app is used for.</span>
67
67
  {{/ui/form-field}}
68
68
  </div>
69
69
 
@@ -72,8 +72,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
72
72
  {{#> ui/form-field id="title" label="Display title" error=errors.title}}
73
73
  <input type="text" class="input{{#if errors.title}} is-invalid{{/if}}" id="title" name="title"
74
74
  value="{{values.title}}" placeholder="" />
75
- <span class="helper-text">Optional display title next to the application button on the account type
76
- selection page.</span>
75
+ <span class="helper-text">Optional title shown next to this app on the hosted authentication form.</span>
77
76
  {{/ui/form-field}}
78
77
  </div>
79
78
  {{/unless}}{{/unless}}
@@ -92,7 +91,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
92
91
  <div>
93
92
  {{> ui/checkbox id="enabled" name="enabled" label="Enable this app" checked=values.enabled
94
93
  error=errors.enabled
95
- hint="If enabled, then this OAuth2 app is shown as an account type option in the hosted authentication form."}}
94
+ hint="Show this app as an account type in the hosted authentication form."}}
96
95
  </div>
97
96
  {{/unless}}{{/unless}}
98
97
 
@@ -147,8 +146,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
147
146
  <div>
148
147
  {{> ui/btn label="Load configuration from the service key file…" variant="info" id="serviceFile"
149
148
  icon="icon-[tabler--cloud-upload]"}}
150
- <span class="helper-text">Select the JSON file you received after generating a new service key to
151
- retrieve the service values.</span>
149
+ <span class="helper-text">Choose a service account key JSON file to fill in the credentials below.</span>
152
150
  </div>
153
151
  </div>
154
152
 
@@ -167,32 +165,32 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
167
165
  name="googleProjectId" value="{{values.googleProjectId}}"
168
166
  placeholder="Enter the Google Cloud Project ID of the service, for example &quot;project-name-425411&quot;"
169
167
  required />
170
- <span class="helper-text">OAuth2 Service Project ID</span>
168
+ <span class="helper-text">Google Cloud project that owns this service account.</span>
171
169
  {{/ui/form-field}}
172
170
  </div>
173
171
 
174
172
  <div>
175
- {{#> ui/form-field id="serviceClientEmail" label="Client Email" error=errors.serviceClientEmail}}
173
+ {{#> ui/form-field id="serviceClientEmail" label="Service account email" error=errors.serviceClientEmail}}
176
174
  <input type="email" class="input{{#if errors.serviceClientEmail}} is-invalid{{/if}}" id="serviceClientEmail"
177
175
  name="serviceClientEmail" value="{{values.serviceClientEmail}}"
178
176
  placeholder="Enter the principal of the service, for example &quot;name@project-123.iam.gserviceaccount.com&quot;"
179
177
  required />
180
- <span class="helper-text">OAuth2 Service Client Email</span>
178
+ <span class="helper-text">Email address of the Google service account.</span>
181
179
  {{/ui/form-field}}
182
180
  </div>
183
181
 
184
182
  <div>
185
- {{#> ui/form-field id="serviceClient" label="Service client" error=errors.serviceClient}}
183
+ {{#> ui/form-field id="serviceClient" label="Service account client ID" error=errors.serviceClient}}
186
184
  <input type="text" class="input{{#if errors.serviceClient}} is-invalid{{/if}}" id="serviceClient"
187
185
  name="serviceClient" value="{{values.serviceClient}}" placeholder="Enter service client ID&mldr;"
188
186
  required />
189
- <span class="helper-text">OAuth2 Service Client ID</span>
187
+ <span class="helper-text">Numeric client ID used to configure domain-wide delegation.</span>
190
188
  {{/ui/form-field}}
191
189
  </div>
192
190
 
193
191
  <div class="auth-method-section auth-method-section-serviceKey{{#unless authMethodIsServiceKey}} hidden{{/unless}}">
194
192
  <div>
195
- {{#> ui/form-field id="serviceKey" label="Secret service key" error=errors.serviceKey}}
193
+ {{#> ui/form-field id="serviceKey" label="Private key" error=errors.serviceKey}}
196
194
  <textarea class="textarea w-full droptxt autoselect{{#if errors.serviceKey}} is-invalid{{/if}}"
197
195
  id="serviceKey" name="serviceKey" rows="8" data-enable-grammarly="false" spellcheck="false" {{#if
198
196
  hasServiceKey}}placeholder="Service key is set but not shown&mldr;" {{else}}
@@ -224,7 +222,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
224
222
  {{else if activeOutlookService}}
225
223
 
226
224
  <div>
227
- {{#> ui/form-field id="clientId" label="Azure Application Id" error=errors.clientId}}
225
+ {{#> ui/form-field id="clientId" label="Application (client) ID" error=errors.clientId}}
228
226
  <input type="text" class="input{{#if errors.clientId}} is-invalid{{/if}}" id="clientId" name="clientId"
229
227
  value="{{values.clientId}}" placeholder="Enter application (client) ID&mldr;" required />
230
228
  <span class="helper-text">The Application (client) ID from your Entra app registration.</span>
@@ -274,8 +272,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
274
272
  <div>
275
273
  {{> ui/btn label="Load configuration from the JSON file…" variant="info" id="gmailConfigFile"
276
274
  icon="icon-[tabler--cloud-upload]"}}
277
- <span class="helper-text">Select the JSON file you can download when viewing client credential information
278
- in Google Cloud Console.</span>
275
+ <span class="helper-text">Choose the OAuth client JSON file downloaded from Google Cloud Console.</span>
279
276
  </div>
280
277
 
281
278
  <div>
@@ -293,20 +290,20 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
293
290
  {{#> ui/form-field id="clientId" error=errors.clientId}}
294
291
  <label class="label-text" for="clientId">
295
292
  {{#if activeGmail}}
296
- Client Id
293
+ Client ID
297
294
  {{/if}}
298
295
 
299
296
  {{#if activeMailRu}}
300
- Client Id
297
+ Client ID
301
298
  {{/if}}
302
299
 
303
300
  {{#if activeOutlook}}
304
- Azure Application Id
301
+ Application (client) ID
305
302
  {{/if}}
306
303
  </label>
307
304
  <input type="text" class="input{{#if errors.clientId}} is-invalid{{/if}}" id="clientId" name="clientId"
308
305
  value="{{values.clientId}}" placeholder="Enter client ID&mldr;" required />
309
- <span class="helper-text">OAuth2 client id.</span>
306
+ <span class="helper-text">Client ID from your provider's app configuration.</span>
310
307
  {{/ui/form-field}}
311
308
  </div>
312
309
 
@@ -631,9 +628,8 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
631
628
  class="card-footer border-base-content/10 border-t px-6 py-4{{#unless baseScopesApi}} hidden{{/unless}}">
632
629
 
633
630
  <p class="mb-2">
634
- To enable webhooks for email accounts managed by this app, EmailEngine needs to set up a Cloud Pub/Sub
635
- service using a Gmail Service Account with the <em>Pub/Sub Admin</em> role. Select the Gmail Pub/Sub Service
636
- Account below to configure this.
631
+ For faster webhook notifications, select a Gmail service account with the Pub/Sub Admin role.
632
+ EmailEngine uses it to set up Google Cloud Pub/Sub for accounts managed by this app.
637
633
  </p>
638
634
 
639
635
  <p class="mb-2">
@@ -759,7 +755,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
759
755
  <p class="mb-2">
760
756
  Both endpoints must be publicly reachable for anonymous HTTPS
761
757
  <strong>POST</strong> requests. When a notification arrives, EmailEngine
762
- immediately forwards the event to your application through its own webhooks.
758
+ processes the change and sends matching events through your configured webhooks.
763
759
  </p>
764
760
 
765
761
  <p>
@@ -802,7 +798,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
802
798
  <p class="mb-2">
803
799
  Both endpoints must be publicly reachable for anonymous HTTPS
804
800
  <strong>POST</strong> requests. When a notification arrives, EmailEngine
805
- immediately forwards the event to your application through its own webhooks.
801
+ processes the change and sends matching events through your configured webhooks.
806
802
  </p>
807
803
 
808
804
  <p>
@@ -822,15 +818,15 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
822
818
  {{#if activeGmail}}
823
819
  <div class="card bg-base-100 shadow-md mb-6{{#unless baseScopesApi}} hidden{{/unless}}" id="account-type-card-gmail">
824
820
  <div class="card-header">
825
- <h6 class="card-title text-primary">Account Type Helper</h6>
821
+ <h6 class="card-title text-primary">Scope presets</h6>
826
822
  </div>
827
823
  <div class="card-body">
828
- <p class="mb-4">Click a button to automatically populate the scope fields with preset configurations:</p>
824
+ <p class="mb-4">Choose a preset to fill in the scope fields below:</p>
829
825
 
830
826
  <div class="join mb-4" role="group">
831
827
  <button type="button" class="btn btn-outline btn-primary btn-sm join-item account-type-btn"
832
828
  data-type="normal" data-provider="gmail">
833
- Normal (Full Access)
829
+ Full access
834
830
  </button>
835
831
  <button type="button" class="btn btn-outline btn-primary btn-sm join-item account-type-btn"
836
832
  data-type="readonly" data-provider="gmail">
@@ -848,7 +844,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
848
844
 
849
845
  <div class="mt-2">
850
846
  <small class="text-base-content/60">
851
- <strong>Normal:</strong> Default Gmail API scopes for full mailbox access<br>
847
+ <strong>Full access:</strong> Default Gmail API scopes for full mailbox access<br>
852
848
  <strong>Read-Only:</strong> Uses <code>gmail.readonly</code> scope for read-only access (no send)<br>
853
849
  <strong>Read-Only + Send:</strong> Uses <code>gmail.readonly</code> and <code>gmail.send</code>
854
850
  scopes<br>
@@ -872,15 +868,15 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
872
868
  {{#if activeOutlook}}
873
869
  <div class="card bg-base-100 shadow-md mb-6{{#unless baseScopesApi}} hidden{{/unless}}" id="account-type-card-outlook">
874
870
  <div class="card-header">
875
- <h6 class="card-title text-primary">Account Type Helper</h6>
871
+ <h6 class="card-title text-primary">Scope presets</h6>
876
872
  </div>
877
873
  <div class="card-body">
878
- <p class="mb-4">Click a button to automatically populate the scope fields with preset configurations:</p>
874
+ <p class="mb-4">Choose a preset to fill in the scope fields below:</p>
879
875
 
880
876
  <div class="join mb-4" role="group">
881
877
  <button type="button" class="btn btn-outline btn-primary btn-sm join-item account-type-btn"
882
878
  data-type="normal" data-provider="outlook">
883
- Normal (Full Access)
879
+ Full access
884
880
  </button>
885
881
  <button type="button" class="btn btn-outline btn-primary btn-sm join-item account-type-btn"
886
882
  data-type="readonly" data-provider="outlook">
@@ -898,7 +894,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
898
894
 
899
895
  <div class="mt-2">
900
896
  <small class="text-base-content/60">
901
- <strong>Normal:</strong> Default MS Graph API scopes for full mailbox access<br>
897
+ <strong>Full access:</strong> Default MS Graph API scopes for full mailbox access<br>
902
898
  <strong>Read-Only:</strong> Uses <code>Mail.Read</code> scope for read-only access (no send)<br>
903
899
  <strong>Read-Only + Send:</strong> Uses <code>Mail.Read</code> with <code>Mail.Send</code> enabled<br>
904
900
  <strong>Send-Only:</strong> Uses <code>Mail.Send</code> scope only (disables
@@ -912,8 +908,8 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
912
908
  {{#> ui/details summary="Additional scopes" id="setupScopes" class="card bg-base-100 shadow-md mb-6"
913
909
  open=values.extraScopes}}
914
910
 
915
- <p class="mb-4">Here you can list additional OAuth2 scopes that EmailEngine should ask for. This is mainly needed
916
- when you want to re-use the access tokens generated by EmailEngine in other parts of your application.</p>
911
+ <p class="mb-4">Request additional OAuth2 scopes, for example when your application uses the provider access tokens
912
+ for services beyond email.</p>
917
913
 
918
914
  {{#if activeGmail}}
919
915
  <div class="alert alert-soft alert-info mb-4 block">
@@ -921,7 +917,7 @@ open=values.extraScopes}}
921
917
  enabled for your OAuth2 app (look for <em>Enabled APIs & services</em> in <a
922
918
  href="https://console.cloud.google.com/apis/dashboard" target="_blank" rel="noopener noreferrer"
923
919
  referrerpolicy="no-referrer" class="link link-animated">Google Cloud Console</a>)
924
- before registering accounts with these permissions. Otherwise, token generations will fail.</p>
920
+ before registering accounts with these permissions. Otherwise, token generation will fail.</p>
925
921
  </div>
926
922
  {{/if}}
927
923
 
@@ -930,7 +926,7 @@ open=values.extraScopes}}
930
926
  enabled for your OAuth2 app (look for <em>Enabled APIs & services</em> in <a
931
927
  href="https://console.cloud.google.com/apis/dashboard" target="_blank" rel="noopener noreferrer"
932
928
  referrerpolicy="no-referrer" class="link link-animated">Google Cloud Console</a>)
933
- before registering accounts with these permissions. Otherwise, token generations will fail.</span>
929
+ before registering accounts with these permissions. Otherwise, token generation will fail.</span>
934
930
  </div>
935
931
  {{/if}}
936
932
 
@@ -958,7 +954,7 @@ open=values.extraScopes}}
958
954
  <textarea class="textarea w-full font-mono{{#if errors.extraScopes}} is-invalid{{/if}}" id="extraScopes"
959
955
  name="extraScopes" rows="5" spellcheck="false" data-enable-grammarly="false"
960
956
  placeholder="Scope identifiers like &quot;https://mail.google.com/&quot;&mldr;">{{values.extraScopes}}</textarea>
961
- <span class="helper-text">Keep one scope per line</span>
957
+ <span class="helper-text">Enter one scope per line.</span>
962
958
  {{/ui/form-field}}
963
959
  </div>
964
960
 
@@ -967,8 +963,7 @@ open=values.extraScopes}}
967
963
  {{#> ui/details summary="Disabled scopes" id="skipScopes" class="card bg-base-100 shadow-md mb-6"
968
964
  open=values.skipScopes}}
969
965
 
970
- <p class="mb-4">Here you can list OAuth2 scopes that EmailEngine should not use. This is mainly needed
971
- when you want to disable some default scopes like <code>"SMTP.Send"</code> in Outlook or
966
+ <p class="mb-4">Exclude default OAuth2 scopes that your integration does not need, such as <code>"SMTP.Send"</code> in Outlook or
972
967
  <code>"https://www.googleapis.com/auth/gmail.modify"</code> in Gmail.
973
968
  </p>
974
969
 
@@ -977,13 +972,13 @@ open=values.skipScopes}}
977
972
  <textarea class="textarea w-full font-mono{{#if errors.skipScopes}} is-invalid{{/if}}" id="skipScopesList"
978
973
  name="skipScopes" rows="5" spellcheck="false" data-enable-grammarly="false"
979
974
  placeholder="Scope identifiers like &quot;SMTP.Send&quot;&mldr;">{{values.skipScopes}}</textarea>
980
- <span class="helper-text">Keep one scope per line</span>
975
+ <span class="helper-text">Enter one scope per line.</span>
981
976
  {{/ui/form-field}}
982
977
  </div>
983
978
 
984
979
  {{/ui/details}}
985
980
 
986
- <script nonce="{{cspNonce}}">
981
+ <script data-cfasync="false" nonce="{{cspNonce}}">
987
982
 
988
983
  document.addEventListener('DOMContentLoaded', () => {
989
984
 
@@ -8,7 +8,7 @@ button and the 15 second auto-dismiss live in static/js/public.js. --}}
8
8
  <strong>{{title}}</strong>
9
9
  {{/if}} {{message}}
10
10
  </div>
11
- <button type="button" class="ee-flash-close" aria-label="Close">
11
+ <button type="button" class="ee-flash-close" aria-label="{{_ "Close" templateLocale }}">
12
12
  <span aria-hidden="true">&times;</span>
13
13
  </button>
14
14
  </div>
@@ -0,0 +1,15 @@
1
+ {{!-- The translated strings eeRenderTestErrors and eePostConnectionTest (static/js/public.js) take,
2
+ declared once for the two hosted-form pages that run a connection test: the server settings page,
3
+ which reports into a dialog, and the checking page, which reports inline.
4
+
5
+ The JS behind these lives in public.js; only the strings have to be here, because the gettext
6
+ extractor reads views/**/*.hbs and the `_` helper needs the render context. Included from inside a
7
+ nonced <script> block on each page - it emits no tag of its own. --}}
8
+ const TEST_ERROR_LABELS = {
9
+ error: `{{_ "Error" templateLocale }}`,
10
+ invalidSettings: `{{_ "Invalid settings" templateLocale }}`,
11
+ imapFailed: `{{_ "Couldn't connect to IMAP server" templateLocale }}`,
12
+ smtpFailed: `{{_ "Couldn't connect to SMTP server" templateLocale }}`,
13
+ serverResponse: `{{_ "Server response:" templateLocale }}`
14
+ };
15
+ const REQUEST_FAILED_TEXT = `{{_ "Request failed." templateLocale }}`;
@@ -1,4 +1,4 @@
1
- <script nonce="{{cspNonce}}">
1
+ <script data-cfasync="false" nonce="{{cspNonce}}">
2
2
  // Apply the theme before first paint to avoid a flash. Public-page twin of
3
3
  // theme_init.hbs with one extra source, a ?theme= query argument, so the
4
4
  // application that linked or redirected here can make these pages match its
@@ -1,6 +1,6 @@
1
1
  {{> ui/page-header title="Account Security" icon="icon-[tabler--shield-lock]" class="mb-1"}}
2
2
 
3
3
  <p class="mb-6">
4
- EmailEngine provides access to sensitive email data, so you should minimally protect it with an account password to
5
- keep malicious users away. Using a firewall is also advised.
4
+ Manage how administrators sign in to EmailEngine. Set a password, add two-factor authentication or passkeys,
5
+ and configure single sign-on.
6
6
  </p>
@@ -6,15 +6,15 @@
6
6
 
7
7
  {{#> ui/card bodyClass="space-y-4"}}
8
8
 
9
- {{> ui/form-field id="inputName" name="name" label="Name" value=values.name error=errors.name required=true hint="Name for this template."}}
9
+ {{> ui/form-field id="inputName" name="name" label="Name" value=values.name error=errors.name required=true hint="Name shown in the template list."}}
10
10
 
11
- {{> ui/form-field id="inputDescription" name="description" label="Description" value=values.description error=errors.description hint="Description for this template."}}
11
+ {{> ui/form-field id="inputDescription" name="description" label="Description" value=values.description error=errors.description hint="Describe when to use this template."}}
12
12
 
13
13
  {{> ui/form-field id="inputSubject" name="subject" label="Subject" value=values.subject error=errors.subject hint="Subject line for the sent email. Handlebars syntax is allowed."}}
14
14
 
15
15
  {{> ui/form-field id="inputPreviewText" name="previewText" label="Preview text" value=values.previewText error=errors.previewText hint="Preview text appears in the inbox after the subject line. Handlebars syntax is allowed."}}
16
16
 
17
- {{#> ui/form-field id="inputFormat" label="HTML source format" error=errors.format hint="EmailEngine will generate final HTML using the selected code formatter."}}
17
+ {{#> ui/form-field id="inputFormat" label="HTML source format" error=errors.format hint="Choose whether to write the email body in HTML or Markdown."}}
18
18
  <select class="select{{#if errors.format}} is-invalid{{/if}}" id="inputFormat" name="format">
19
19
  {{#each formats}}
20
20
  <option value="{{format}}" {{#if selected}}selected{{/if}}>{{name}}</option>
@@ -61,7 +61,7 @@
61
61
  (ids included), so the ACE editor bootstrap lives here instead of per page. --}}
62
62
  {{> ace_assets}}
63
63
 
64
- <script nonce="{{cspNonce}}">
64
+ <script data-cfasync="false" nonce="{{cspNonce}}">
65
65
  document.addEventListener('DOMContentLoaded', () => {
66
66
 
67
67
  const editors = new Map();
@@ -1,4 +1,4 @@
1
- <script nonce="{{cspNonce}}">
1
+ <script data-cfasync="false" nonce="{{cspNonce}}">
2
2
  // Apply the stored theme before first paint to avoid a flash; when unset, the
3
3
  // stylesheet falls back to prefers-color-scheme. The "eeTheme" storage contract
4
4
  // is shared with the theme toggle in static/js/ui.js.
@@ -23,8 +23,11 @@
23
23
  {{> ui/checkbox id=field name=field label="Enable TLS Encryption" class="trigger-example-render"
24
24
  checked=(lookup values field) error=(lookup errors field)}}
25
25
 
26
+ {{!-- shrink-0: the checkbox beside it is w-full, so without this the badge is the
27
+ flex item that gives way - it was squeezed to half its text and printed its
28
+ second line over the setting reference --}}
26
29
  {{#if tlsSummary.label}}
27
- {{#> ui/tooltip text=tlsSummary.label.title}}
30
+ {{#> ui/tooltip text=tlsSummary.label.title class="shrink-0"}}
28
31
  {{> ui/badge label=tlsSummary.label.text variant=tlsSummary.label.type elId="tls-label"}}
29
32
  {{/ui/tooltip}}
30
33
  {{/if}}
@@ -24,8 +24,13 @@
24
24
  lpignore - true to add data-lpignore + autocomplete="off" (credential-ish
25
25
  fields that password managers must not autofill)
26
26
  class - extra classes on the input (optional)
27
+ The control column is capped: on a 1440px screen a card is over 1000px wide, and a
28
+ single-line input stretched across all of it separates the value from its label and
29
+ makes a four-digit retry count look like a paragraph field. The selects on the same
30
+ pages were already capped (max-w-md), so uncapped text inputs read as an oversight.
31
+ w-full keeps it full width wherever the container is narrower than the cap.
27
32
  --}}
28
- <div class="w-full">
33
+ <div class="w-full max-w-2xl">
29
34
  {{#if label}}
30
35
  <label class="label-text" for="{{id}}">{{label}}</label>
31
36
  {{/if}}
@@ -1,6 +1,6 @@
1
1
  {{!--
2
- ui/setting-ref - floated reference link to a setting key in the API docs,
3
- shown at the top-right of config form fields:
2
+ ui/setting-ref - reference link to a setting key in the API docs, shown at the
3
+ top-right of config form fields (floated from sm up, on its own line below it):
4
4
  {{> ui/setting-ref name="proxyEnabled"}}
5
5
  Params:
6
6
  name - settings key, shown as the link text (required)
@@ -11,11 +11,16 @@
11
11
  no docs anchor)
12
12
  prefix - literal text inside the brackets before the link, e.g.
13
13
  prefix="API Reference: " (optional)
14
- nofloat - true to render in flow instead of float-right (stacked
15
- reference columns) (optional)
16
- class - extra classes on the wrapper, e.g. "whitespace-nowrap" for
17
- flex-row placements where the float is inert (optional)
14
+ nofloat - true to never float, at any width. For a stacked reference column,
15
+ where a floated first entry lands on the same line as the
16
+ right-aligned block under it and prints over it (optional)
17
+ class - extra classes on the wrapper, e.g. "whitespace-nowrap" to keep a
18
+ setting key from breaking mid-identifier (optional)
19
+ The float is sm-and-up only. A setting key is long and does not wrap, so beside a
20
+ phone-width field it left the label a column of single words - or, where that field
21
+ was a flex row the float could not narrow any further, printed on top of it. Below
22
+ sm it takes its own line, right-aligned where the float put it.
18
23
  --}}
19
- <div class="text-base-content/60{{#unless nofloat}} float-right{{/unless}} code-link{{#if class}} {{class}}{{/if}}">[{{prefix}}{{#if plain}}{{name}}{{else}}<a
24
+ <div class="text-base-content/60{{#unless nofloat}} sm:float-right max-sm:mb-0.5 max-sm:text-end{{/unless}} code-link{{#if class}} {{class}}{{/if}}">[{{prefix}}{{#if plain}}{{name}}{{else}}<a
20
25
  href="{{#if href}}{{href}}{{else}}/admin/reference/settings#postV1Settings{{/if}}" target="_blank"
21
26
  rel="noopener noreferrer" class="link link-animated">{{name}}</a>{{/if}}{{suffix}}]</div>
@@ -14,9 +14,12 @@
14
14
  into the caller's context, so a partial reading `id` also inherits one
15
15
  that merely happens to be in scope - a row's id inside {{#each}}
16
16
  class - extra classes (optional)
17
+ The tile form hides its icon below sm: two tiles per row on a phone leave the
18
+ label roughly 60px next to a 36px icon box, which wraps a two-word label into a
19
+ column. The notice form (title set) keeps it - that card is always full width.
17
20
  --}}
18
21
  {{#*inline "iconBox"}}
19
- <div class="bg-{{#if variant}}{{eeColor variant}}{{else}}primary{{/if}}/10 text-{{#if variant}}{{eeColor variant}}{{else}}primary{{/if}} rounded-field flex size-9 shrink-0 items-center justify-center">
22
+ <div class="bg-{{#if variant}}{{eeColor variant}}{{else}}primary{{/if}}/10 text-{{#if variant}}{{eeColor variant}}{{else}}primary{{/if}} rounded-field flex size-9 shrink-0 items-center justify-center{{#unless title}} max-sm:hidden{{/unless}}">
20
23
  <span class="{{icon}} size-5"></span>
21
24
  </div>
22
25
  {{/inline}}
@@ -11,18 +11,14 @@
11
11
  variant - "segment" for the pill/segmented style (.tabs-segment in
12
12
  app.tailwind.css), for a choice nested inside a page that
13
13
  already has a bordered strip at the top; default bordered
14
- flex-wrap because FlyonUI lays the strip out as a nowrap flex row with no overflow
15
- handling, so one wider than its column pushes the whole page sideways instead of
16
- adapting: an API reference operation documents up to eight status codes, which is 464px
17
- of tabs against a 390px phone. Wrapping rather than scrolling because these are
18
- navigation - a second row keeps every tab reachable, where a scroller hides some behind
19
- an interaction with no affordance for it. No strip in the app wraps at desktop width.
14
+ A strip that outgrows its column wraps rather than scrolls; that rule is on .tabs in
15
+ app.tailwind.css, because the three hand-rolled link navs need it too.
20
16
  Panels are the caller's responsibility: each ui/tab target must match a
21
17
  tabpanel element with that id (role="tabpanel" aria-labelledby="<target>-tab").
22
18
  The auth-method tabs in oauth_form.hbs intentionally do NOT use this partial -
23
19
  they run a custom script instead of the FlyonUI data-tabs plugin.
24
20
  --}}
25
- <nav class="tabs {{#equals variant 'segment'}}tabs-segment{{else}}tabs-bordered{{/equals}} flex-wrap{{#if class}} {{class}}{{/if}}" aria-label="{{label}}" role="tablist"{{#if elId}} id="{{elId}}"{{/if}} data-tabs>
21
+ <nav class="tabs {{#equals variant 'segment'}}tabs-segment{{else}}tabs-bordered{{/equals}}{{#if class}} {{class}}{{/if}}" aria-label="{{label}}" role="tablist"{{#if elId}} id="{{elId}}"{{/if}} data-tabs>
26
22
  {{!-- own hash params neutralized against fallthrough into the block --}}
27
23
  {{> @partial-block label="" elId="" class="" variant=""}}
28
24
  </nav>
@@ -3,20 +3,20 @@
3
3
 
4
4
  {{#> ui/card bodyClass="space-y-4"}}
5
5
 
6
- {{> ui/form-field id="inputName" name="name" label="Name" value=values.name error=errors.name required=true hint="Name for this routing."}}
6
+ {{> ui/form-field id="inputName" name="name" label="Name" value=values.name error=errors.name required=true hint="Name shown in the webhook route list."}}
7
7
 
8
- {{> ui/form-field id="inputDescription" name="description" label="Description" value=values.description error=errors.description hint="Description for this routing."}}
8
+ {{> ui/form-field id="inputDescription" name="description" label="Description" value=values.description error=errors.description hint="Describe which events this route handles and where it sends them."}}
9
9
 
10
- {{> ui/form-field id="inputTargetUrl" name="targetUrl" type="url" label="Target URL" value=values.targetUrl error=errors.targetUrl placeholder='URL like "https://myservice.com/imap/webhooks"' hint="Webhook target URL for this routing. Leave empty to deliver to the default webhook URL from the Webhooks settings."}}
10
+ {{> ui/form-field id="inputTargetUrl" name="targetUrl" type="url" label="Target URL" value=values.targetUrl error=errors.targetUrl placeholder='URL like "https://myservice.com/imap/webhooks"' hint="Destination for matching events. Leave blank to use the default URL in Webhooks settings."}}
11
11
 
12
- {{> ui/checkbox id="enabled" label="Enable this webhook route" checked=values.enabled error=errors.enabled hint="Webhook routes are not enabled by default."}}
12
+ {{> ui/checkbox id="enabled" label="Enable this webhook route" checked=values.enabled error=errors.enabled hint="Send matching events to this route's target URL. New routes are disabled until you enable them."}}
13
13
 
14
14
  {{#> ui/details summary="Custom request headers" class="card border border-base-content/10" summaryClass="px-4 py-2" open=values.customHeaders}}
15
15
  <div>
16
- <p class="mb-4">Here you can list additional request headers to be passed with each webhook request.
16
+ <p class="mb-4">Add headers to each request sent by this route, such as an Authorization header.
17
17
  </p>
18
18
 
19
- {{#> ui/form-field id="customHeaders" label="List of custom headers" error=errors.customHeaders hint="Keep one header per line"}}
19
+ {{#> ui/form-field id="customHeaders" label="Custom headers" error=errors.customHeaders hint="Enter one header per line in Header-Name: value format."}}
20
20
  <textarea class="textarea font-mono w-full{{#if errors.customHeaders}} is-invalid{{/if}}" id="customHeaders"
21
21
  name="customHeaders" rows="5" spellcheck="false" data-enable-grammarly="false"
22
22
  placeholder="Custom headers like &quot;Authorization: Bearer secret_token&quot;&mldr;">{{values.customHeaders}}</textarea>
@@ -31,10 +31,8 @@
31
31
  referrerpolicy="no-referrer" class="link link-animated">documentation</a>]</div>
32
32
  <label class="label-text" for="editor-fn">Filter function</label>
33
33
  <div class="mb-2 leading-tight">
34
- <small>JavaScript code to determine if the webhook should be sent. If the code evaluates to
35
- <code>true</code> then the webhook is sent, otherwise it is skipped.
36
- The script includes <code>payload</code> as a global variable that contains the webhook
37
- payload. Use <code>env</code> to access <a href="/admin/config/webhooks#scriptEnv"
34
+ <small>Return <code>true</code> to send the event, or <code>false</code> to skip it.
35
+ A route without a filter sends no events. Access the event data through <code>payload</code>. Use <code>env</code> to access <a href="/admin/config/webhooks#scriptEnv"
38
36
  class="link link-animated">script variables</a>.</small>
39
37
  </div>
40
38
  {{#> ui/code-editor id="editor-fn" title="Filter function"}}
@@ -56,8 +54,7 @@
56
54
  <div>
57
55
  <label class="label-text" for="editor-map">Map function</label>
58
56
  <div class="mb-2 leading-tight">
59
- <small>JavaScript code to modify webhook payload output. Some services might expect incoming data using
60
- a specific format. Whatever is returned by this function will be used as the webhook
57
+ <small>Transform the event data into the format your destination expects. Return the object to send as the webhook
61
58
  payload. Use <code>env</code> to access <a href="/admin/config/webhooks#scriptEnv"
62
59
  class="link link-animated">script variables</a>.</small>
63
60
  </div>
@@ -3,7 +3,7 @@
3
3
  configured target URL). --}}
4
4
  {{> filter_editor_js hasMap=true}}
5
5
 
6
- <script nonce="{{cspNonce}}">
6
+ <script data-cfasync="false" nonce="{{cspNonce}}">
7
7
  document.addEventListener('DOMContentLoaded', () => {
8
8
 
9
9
  const sendTestPayload = async () => {
@@ -5,7 +5,7 @@
5
5
  {{> reference/token-alert}}
6
6
 
7
7
  {{> ui/page-header title="API Reference" icon="icon-[tabler--api]" class="mb-4"
8
- subtitle="Every EmailEngine REST endpoint, generated from the same schemas the API validates against."}}
8
+ subtitle="Explore REST API endpoints, request examples, and response formats."}}
9
9
 
10
10
  {{#> ui/card title="Getting started" bodyClass="space-y-4"}}
11
11
 
@@ -30,7 +30,7 @@ subtitle="Every EmailEngine REST endpoint, generated from the same schemas the A
30
30
  {{/if}}
31
31
 
32
32
  <div>
33
- <h3 class="text-base-content mb-1 font-semibold">Error envelope</h3>
33
+ <h3 class="text-base-content mb-1 font-semibold">Error response format</h3>
34
34
  <pre class="ee-code-block"><code class="language-json">{
35
35
  "statusCode": 400,
36
36
  "error": "Bad Request",
@@ -73,4 +73,4 @@ subtitle="Every EmailEngine REST endpoint, generated from the same schemas the A
73
73
  </div>
74
74
 
75
75
  {{!-- deferred highlighting, sidebar filter and try-it runner; the page content itself is server-rendered --}}
76
- <script src="/static/js/reference.js" defer></script>
76
+ <script data-cfasync="false" src="/static/js/reference.js" defer></script>
@@ -13,7 +13,7 @@
13
13
  redirectMap is serialized by jsonForScript() in lib/api-reference/index.js, which escapes
14
14
  `<` so the literal cannot terminate this script element.
15
15
  --}}
16
- <script nonce="{{cspNonce}}">
16
+ <script data-cfasync="false" nonce="{{cspNonce}}">
17
17
  (() => {
18
18
  const map = {{{redirectMap}}};
19
19
  const fallback = '/admin/reference';
@@ -25,4 +25,4 @@
25
25
  {{/each}}
26
26
 
27
27
  {{!-- deferred highlighting, sidebar filter and try-it runner; the page content itself is server-rendered --}}
28
- <script src="/static/js/reference.js" defer></script>
28
+ <script data-cfasync="false" src="/static/js/reference.js" defer></script>
@@ -27,10 +27,10 @@ subtitle="Enables the Try it panels on the endpoint pages."}}
27
27
  </div>
28
28
 
29
29
  <div>
30
- {{> reference/section-heading label="Or mint a temporary one" class="mb-2"}}
30
+ {{> reference/section-heading label="Or create a temporary token" class="mb-2"}}
31
31
  <div class="flex flex-wrap items-center gap-2">
32
32
  {{> ui/btn id="ref-token-mint" variant="primary" size="sm" icon="icon-[tabler--clock-plus]"
33
- label="Mint temporary token" class="ref-token-mint"}}
33
+ label="Create temporary token" class="ref-token-mint"}}
34
34
  {{!-- shown by static/js/reference.js only while a token is actually held --}}
35
35
  <span id="ref-token-clear-wrap" class="hidden">
36
36
  {{> ui/btn id="ref-token-clear" variant="neutral" style="text" size="sm" icon="icon-[tabler--x]" label="Clear"}}
@@ -41,7 +41,7 @@ subtitle="Enables the Try it panels on the endpoint pages."}}
41
41
  {{> ui/badge elId="ref-token-expiry" variant="primary" soft=true class="badge-sm hidden" label="" icon=""}}
42
42
  </div>
43
43
  <p class="text-base-content/50 mt-2 text-xs">Creates an API-scoped token that expires in one hour and activates it
44
- here. It is a real token until then - it appears on the
44
+ here. It appears on the
45
45
  <a href="/admin/tokens" class="link link-primary">Access Tokens</a> page and can be revoked there.</p>
46
46
  </div>
47
47
 
@@ -50,4 +50,4 @@ subtitle="Enables the Try it panels on the endpoint pages."}}
50
50
  {{/ui/card}}
51
51
 
52
52
  {{!-- deferred highlighting, sidebar filter and try-it runner; the page content itself is server-rendered --}}
53
- <script src="/static/js/reference.js" defer></script>
53
+ <script data-cfasync="false" src="/static/js/reference.js" defer></script>