emailengine-app 2.80.1 → 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 (120) 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 +32 -0
  8. package/Dockerfile +17 -9
  9. package/data/google-crawlers.json +1 -1
  10. package/docker-compose.yml +7 -1
  11. package/lib/api-routes/account-routes.js +158 -72
  12. package/lib/api-routes/permission-map.js +6 -1
  13. package/lib/autodetect-imap-settings.js +4 -4
  14. package/lib/sentry.js +13 -2
  15. package/lib/tls/provision.js +1 -1
  16. package/lib/token-permission-view.js +8 -7
  17. package/lib/tools.js +1 -0
  18. package/lib/ui-routes/account-routes.js +195 -61
  19. package/lib/ui-routes/admin-entities-routes.js +9 -9
  20. package/package.json +13 -13
  21. package/sbom.json +1 -1
  22. package/static/css/flyonui.css +1 -1
  23. package/static/css/public.css +41 -0
  24. package/static/css/src/app.tailwind.css +135 -4
  25. package/static/js/public.js +218 -0
  26. package/static/licenses.html +19 -19
  27. package/translations/README.md +4 -3
  28. package/translations/de.mo +0 -0
  29. package/translations/de.po +296 -185
  30. package/translations/en.po +220 -128
  31. package/translations/es.mo +0 -0
  32. package/translations/es.po +558 -0
  33. package/translations/et.mo +0 -0
  34. package/translations/et.po +288 -181
  35. package/translations/fr.mo +0 -0
  36. package/translations/fr.po +295 -183
  37. package/translations/it.mo +0 -0
  38. package/translations/it.po +558 -0
  39. package/translations/ja.mo +0 -0
  40. package/translations/ja.po +268 -192
  41. package/translations/locales.json +24 -0
  42. package/translations/messages.pot +124 -78
  43. package/translations/nl.mo +0 -0
  44. package/translations/nl.po +288 -175
  45. package/translations/pl.mo +0 -0
  46. package/translations/pl.po +294 -181
  47. package/translations/sv.mo +0 -0
  48. package/translations/sv.po +555 -0
  49. package/translations/tr.mo +0 -0
  50. package/translations/tr.po +555 -0
  51. package/update-info.sh +12 -6
  52. package/views/account/login-redirect.hbs +6 -5
  53. package/views/account/passkeys.hbs +6 -6
  54. package/views/account/security.hbs +2 -2
  55. package/views/accounts/account.hbs +17 -19
  56. package/views/accounts/edit.hbs +14 -14
  57. package/views/accounts/index.hbs +3 -3
  58. package/views/accounts/register/imap-server.hbs +26 -172
  59. package/views/accounts/register/validating.hbs +139 -0
  60. package/views/config/ai.hbs +14 -16
  61. package/views/config/branding.hbs +5 -5
  62. package/views/config/document-store/chat.hbs +8 -7
  63. package/views/config/document-store/index.hbs +13 -14
  64. package/views/config/document-store/mappings/index.hbs +5 -6
  65. package/views/config/document-store/mappings/new.hbs +1 -2
  66. package/views/config/document-store/pre-processing/index.hbs +4 -4
  67. package/views/config/email-processing.hbs +6 -6
  68. package/views/config/imap-proxy.hbs +6 -7
  69. package/views/config/license.hbs +8 -8
  70. package/views/config/logging.hbs +5 -7
  71. package/views/config/mcp.hbs +14 -18
  72. package/views/config/network.hbs +3 -3
  73. package/views/config/oauth/app.hbs +10 -10
  74. package/views/config/oauth/index.hbs +6 -6
  75. package/views/config/oauth/subscriptions.hbs +9 -9
  76. package/views/config/security.hbs +5 -7
  77. package/views/config/service.hbs +10 -9
  78. package/views/config/smtp.hbs +8 -11
  79. package/views/config/tls-upload.hbs +3 -3
  80. package/views/config/tls.hbs +33 -35
  81. package/views/config/webhooks.hbs +10 -13
  82. package/views/dashboard.hbs +9 -8
  83. package/views/gateways/edit.hbs +3 -3
  84. package/views/gateways/gateway.hbs +3 -3
  85. package/views/gateways/index.hbs +6 -6
  86. package/views/gateways/new.hbs +3 -3
  87. package/views/internals/index.hbs +14 -12
  88. package/views/layout/login.hbs +27 -14
  89. package/views/layout/prompt.hbs +12 -15
  90. package/views/mcp/authorize.hbs +1 -1
  91. package/views/partials/accounts_table.hbs +5 -5
  92. package/views/partials/add_account_modal.hbs +3 -3
  93. package/views/partials/address_list.hbs +4 -4
  94. package/views/partials/gateway_form.hbs +5 -5
  95. package/views/partials/mcp_account_limit.hbs +2 -2
  96. package/views/partials/oauth_config_header.hbs +2 -2
  97. package/views/partials/oauth_form.hbs +36 -41
  98. package/views/partials/public_alerts.hbs +1 -1
  99. package/views/partials/public_test_labels.hbs +15 -0
  100. package/views/partials/security_header.hbs +2 -2
  101. package/views/partials/template_form.hbs +3 -3
  102. package/views/partials/tls_security_card.hbs +4 -1
  103. package/views/partials/ui/form-field.hbs +6 -1
  104. package/views/partials/ui/setting-ref.hbs +12 -7
  105. package/views/partials/ui/stat-card.hbs +4 -1
  106. package/views/partials/ui/tabs.hbs +3 -7
  107. package/views/partials/webhook_form.hbs +9 -12
  108. package/views/reference/index.hbs +2 -2
  109. package/views/reference/token.hbs +3 -3
  110. package/views/suppression-lists/index.hbs +8 -6
  111. package/views/suppression-lists/list.hbs +13 -8
  112. package/views/templates/edit.hbs +1 -1
  113. package/views/templates/index.hbs +10 -11
  114. package/views/templates/template.hbs +4 -4
  115. package/views/tokens/index.hbs +17 -17
  116. package/views/tokens/new.hbs +18 -22
  117. package/views/webhooks/edit.hbs +1 -1
  118. package/views/webhooks/index.hbs +10 -11
  119. package/views/webhooks/new.hbs +1 -1
  120. package/views/webhooks/webhook.hbs +4 -5
@@ -11,7 +11,7 @@
11
11
  <h6 class="mb-6 text-base-content/60">{{total}} suppressed {{#equals total 1}}address{{else}}addresses{{/equals}}</h6>
12
12
 
13
13
  <div class="overflow-x-auto">
14
- <table class="table">
14
+ <table class="table ee-table-stack">
15
15
  <thead>
16
16
  <tr>
17
17
  <th>Address</th>
@@ -27,17 +27,20 @@
27
27
  {{#each addresses}}
28
28
  <tr class="hover:bg-base-200/60">
29
29
  <td><strong>{{recipient}}</strong></td>
30
- <td>{{reason}}</td>
31
- <td>{{source}}</td>
32
- <td>
30
+ <td data-label="Reason">{{reason}}</td>
31
+ <td data-label="Source">{{source}}</td>
32
+ <td data-label="Account">
33
33
  {{#if account}}
34
34
  <a href="/admin/accounts/{{urlpart account}}" class="link link-primary">{{account}}</a>
35
35
  {{else}}
36
36
  <span class="text-base-content/60">-</span>
37
37
  {{/if}}
38
38
  </td>
39
- <td><span class="text-base-content/60">{{created}}</span></td>
40
- <td class="relative text-end">
39
+ <td data-label="Added">
40
+ {{!-- every other list renders its stamps through app.js; this one printed the raw ISO string --}}
41
+ <span class="text-base-content/60 relative-time" data-time="{{created}}">{{created}}</span>
42
+ </td>
43
+ <td class="ee-stack-actions relative text-end">
41
44
  {{!-- The condition sits OUTSIDE the ui/row-actions block on purpose: a partial
42
45
  block whose content is nothing but a {{#if}} wrapper loses its content to a
43
46
  Handlebars program-association bug (the menu rendered without the items).
@@ -80,8 +83,10 @@
80
83
  </form>
81
84
  {{/ui/modal}}
82
85
 
83
- {{> ui/delete-modal id="deleteEntry" noun="address" action=(concat "/admin/suppression-lists/list/" listId "/remove") fieldName="recipient"}}
86
+ {{#> ui/delete-modal id="deleteEntry" noun="address" action=(concat "/admin/suppression-lists/list/" listId "/remove") fieldName="recipient"}}
87
+ Remove <strong class="delete-target-name"></strong> from this suppression list? This address will be eligible to receive emails sent with this list ID again.
88
+ {{/ui/delete-modal}}
84
89
 
85
90
  {{#> ui/confirm-modal id="deleteListModal" title="Delete suppression list" action="/admin/suppression-lists/delete" fieldName="listId" fieldValue=listId submitLabel="Delete list"}}
86
- Are you sure you want to delete <strong>{{listId}}</strong> with all of its addresses? Everyone on this list becomes reachable again. This action cannot be undone.
91
+ Delete <strong>{{listId}}</strong> and all its entries? These addresses will no longer be excluded from emails sent with this list ID. This action cannot be undone.
87
92
  {{/ui/confirm-modal}}
@@ -13,6 +13,6 @@ class="mt-6 mb-6"}}
13
13
  {{>template_form}}
14
14
 
15
15
  <div class="mb-6">
16
- {{> ui/btn label="Update template" type="submit" icon="icon-[tabler--device-floppy]"}}
16
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--device-floppy]"}}
17
17
  </div>
18
18
  </form>
@@ -1,4 +1,4 @@
1
- {{#> ui/page-header title="Templates" icon="icon-[tabler--template]" subtitle="Reusable subject and body content you can reference by ID when sending." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
1
+ {{#> ui/page-header title="Templates" icon="icon-[tabler--template]" subtitle="Create reusable email content and send it by referencing a template ID." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
2
2
  {{> ui/btn href=newLink label="Create template" icon="icon-[tabler--plus]"}}
3
3
  {{/ui/page-header}}
4
4
 
@@ -13,7 +13,7 @@
13
13
  {{#if account}}
14
14
  <div class="card-body">
15
15
  <div>
16
- Currently showing email templates for <strong><a href="/admin/accounts/{{urlpart account.account}}"
16
+ Showing templates for <strong><a href="/admin/accounts/{{urlpart account.account}}"
17
17
  class="link link-animated">{{account.name}}</a></strong>. These templates cannot be
18
18
  used by other accounts.
19
19
  </div>
@@ -21,7 +21,7 @@
21
21
  {{/if}}
22
22
 
23
23
  <div class="overflow-x-auto">
24
- <table class="table">
24
+ <table class="table ee-table-stack">
25
25
  <thead>
26
26
  <tr>
27
27
  <th>Name</th>
@@ -39,11 +39,11 @@
39
39
  <div><strong>{{name}}</strong></div>
40
40
  {{> ui/entity-id id=id label="Template ID"}}
41
41
  </td>
42
- <td class="relative">
42
+ <td class="relative" data-label="Description">
43
43
  {{> ui/row-link href=(concat "/admin/templates/template/" id)}}{{description}}
44
44
  </td>
45
45
 
46
- <td class="relative text-end">
46
+ <td class="ee-stack-actions relative text-end">
47
47
  {{> ui/row-actions openHref=(concat "/admin/templates/template/" id) label="Template actions"
48
48
  deleteModal="#deleteTemplate" deleteId=id deleteName=name}}
49
49
  </td>
@@ -64,7 +64,7 @@
64
64
  {{#if account}}
65
65
  {{#> ui/list-empty noun="templates" query=query firstPage=firstPage createHref=newLink createLabel="Create your first template" clearHref="/admin/templates"}}
66
66
  <div class="mb-2">
67
- Currently showing email templates for <strong><a href="/admin/accounts/{{urlpart account.account}}"
67
+ Showing templates for <strong><a href="/admin/accounts/{{urlpart account.account}}"
68
68
  class="link link-animated">{{#if account.name}}{{account.name}}{{else}}{{account.email}}{{/if}}</a></strong>.
69
69
  These templates cannot be used by other accounts.
70
70
  </div>
@@ -78,10 +78,9 @@
78
78
 
79
79
  {{#> ui/details summary="Usage example" class="card bg-base-100 shadow-md mb-6"}}
80
80
  <div>
81
- <p class="mb-4">When sending emails using the submission API endpoint, do not set <code>"subject"</code>,
82
- <code>"html"</code> and <code>"text"</code> properties. Instead, set the <code>"template"</code>
83
- property with the template ID value and, optionally, <code>"render"</code> definition if you are using
84
- Markdown format as the HTML source or you want to use the Handlebars variables.
81
+ <p class="mb-4">To send a template, set <code>"template"</code> to its ID in the submission API request.
82
+ Omit <code>"subject"</code>, <code>"html"</code>, and <code>"text"</code> so the template supplies them.
83
+ Include <code>"render"</code> to use Handlebars variables or render Markdown as HTML.
85
84
  </p>
86
85
 
87
86
  <pre class="ee-code-block">$ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v1/account/example/submit" \
@@ -108,7 +107,7 @@
108
107
 
109
108
  <hr class="my-4">
110
109
  <div class="text-base-content/60">
111
- <p>This example assumes that you use <code>\{{params.key}}</code> in the subject, html or plain-text
110
+ <p>This example assumes that you use <code>\{{params.key}}</code> in the subject, HTML, or plain text
112
111
  content of the template.</p>
113
112
  </div>
114
113
 
@@ -31,7 +31,7 @@
31
31
  <dd>
32
32
  {{> ui/copy-field id="templateIdValue" value=template.id ariaLabel="ID" small=true join=true class="max-w-md"
33
33
  inputClass="font-mono bg-base-200 border-0"}}
34
- <span class="helper-text">Use this ID value as the <em>"template"</em>
34
+ <span class="helper-text">Use this ID as the <em>"template"</em>
35
35
  property when sending email.</span>
36
36
  </dd>
37
37
 
@@ -83,7 +83,7 @@
83
83
 
84
84
  {{/ui/card}}
85
85
 
86
- {{#> ui/confirm-modal id="deleteModal" title="Delete Template" action="/admin/templates/delete"
86
+ {{#> ui/confirm-modal id="deleteModal" title="Delete template" action="/admin/templates/delete"
87
87
  fieldName="template" fieldValue=template.id submitLabel="Delete template"}}
88
88
  <p>Are you sure you want to delete <strong>{{template.name}}</strong>? This action cannot be undone.</p>
89
89
  {{/ui/confirm-modal}}
@@ -97,10 +97,10 @@ fieldName="template" fieldValue=template.id submitLabel="Delete template"}}
97
97
  <div class="modal-body space-y-4">
98
98
 
99
99
  {{#unless account}}
100
- {{> ui/account-picker id="inputAccount" name="account" label="Account" hint="The account to send the test email as."}}
100
+ {{> ui/account-picker id="inputAccount" name="account" label="Account" hint="Account used to send the test email."}}
101
101
  {{/unless}}
102
102
 
103
- {{> ui/form-field id="inputTo" name="inputTo" type="email" label="Recipient's email address" required=true hint="Where to send the test email to."}}
103
+ {{> ui/form-field id="inputTo" name="inputTo" type="email" label="Recipient's email address" required=true hint="Email address that will receive the test message."}}
104
104
 
105
105
  {{#> ui/details id="jsonStructure" summary="Handlebars payload" class="card border border-base-content/10" summaryClass="px-4 py-2"}}
106
106
  <div>
@@ -1,4 +1,4 @@
1
- {{#> ui/page-header title="Access Tokens" icon="icon-[tabler--key]" subtitle="Bearer tokens that authenticate requests to the EmailEngine API." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
1
+ {{#> ui/page-header title="Access Tokens" icon="icon-[tabler--key]" subtitle="Manage credentials for the API, SMTP server, IMAP proxy, metrics, and MCP clients." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
2
2
  {{!-- Without an admin session the create form cannot submit, so the button would be an invitation
3
3
  to lose the work. Disabled with the reason rather than hidden: the capability exists, it is the
4
4
  instance that is not ready for it. --}}
@@ -24,14 +24,14 @@
24
24
  {{#if account}}
25
25
  <div class="card-body">
26
26
  <div>
27
- Currently showing tokens for <strong><a href="/admin/accounts/{{urlpart account.account}}"
27
+ Showing tokens for <strong><a href="/admin/accounts/{{urlpart account.account}}"
28
28
  class="link link-animated">{{account.name}}</a></strong>. These tokens cannot be
29
29
  used by other accounts.
30
30
  </div>
31
31
  </div>
32
32
  {{/if}}
33
33
  <div class="overflow-x-auto">
34
- <table class="table">
34
+ <table class="table ee-table-stack">
35
35
  <thead>
36
36
  <tr>
37
37
  <th>Description</th>
@@ -61,7 +61,7 @@
61
61
  </td>
62
62
 
63
63
  {{#if ../showAccountColumn}}
64
- <td class="align-top">
64
+ <td class="align-top" data-label="Bound to">
65
65
  {{#if account}}
66
66
  {{#if accountKnown}}
67
67
  <a href="/admin/accounts/{{urlpart account}}" class="link link-animated">{{account}}</a>
@@ -77,7 +77,7 @@
77
77
  </td>
78
78
  {{/if}}
79
79
 
80
- <td class="align-top">
80
+ <td class="align-top" data-label="Scopes">
81
81
  {{#if scopes}}
82
82
  <div class="max-w-xs whitespace-normal">{{#each scopes}}{{#unless first}}, {{/unless}}{{name}}{{/each}}</div>
83
83
  {{/if}}
@@ -85,7 +85,7 @@
85
85
  {{#if permissionSummary}}
86
86
  {{#if permissionSummary.unreadable}}
87
87
  {{> ui/badge label="Unreadable restriction" variant="error" soft=true icon="" class="mt-1"}}
88
- <div class="text-base-content/60 text-xs">Every request with this token is refused. Delete and reissue it.</div>
88
+ <div class="text-base-content/60 text-xs">This token cannot be used because its permissions could not be read. Delete it and create a replacement.</div>
89
89
  {{else}}
90
90
  {{> ui/badge label="Restricted" variant="info" soft=true icon="" class="mt-1"}}
91
91
  {{!-- Wraps and is width-capped: a token granted several sections produced one
@@ -95,7 +95,7 @@
95
95
  {{/if}}
96
96
  </td>
97
97
 
98
- <td>
98
+ <td data-label="Last used">
99
99
  {{#if access.timeStr}}
100
100
  <span class="relative-time" data-time="{{access.timeStr}}"></span>
101
101
  {{else}}
@@ -103,7 +103,7 @@
103
103
  {{/if}}
104
104
  </td>
105
105
 
106
- <td class="text-end">
106
+ <td class="ee-stack-actions text-end">
107
107
  {{> ui/row-actions label="Token actions" deleteModal="#deleteToken" deleteId=id deleteName=description}}
108
108
  </td>
109
109
 
@@ -124,7 +124,7 @@
124
124
  {{#if account}}
125
125
  {{#> ui/list-empty noun="access tokens" query=query filterActive=scopeFilter firstPage=firstPage createHref=newLink createLabel="Create your first access token" clearHref="/admin/tokens"}}
126
126
  <div class="mb-2">
127
- Currently showing tokens for <strong><a href="/admin/accounts/{{urlpart account.account}}"
127
+ Showing tokens for <strong><a href="/admin/accounts/{{urlpart account.account}}"
128
128
  class="link link-animated">{{#if account.name}}{{account.name}}{{else}}{{account.email}}{{/if}}</a></strong>.
129
129
  These tokens cannot be used by other accounts.
130
130
  </div>
@@ -137,16 +137,14 @@
137
137
 
138
138
  {{#> ui/details summary="Usage instructions" class="card bg-base-100 shadow-md mb-6"}}
139
139
  <div>
140
- <p class="mb-4">You must use either the <em>Authorization: Bearer</em> header (recommended) or the
141
- <em>access_token</em> query parameter to make API requests. Avoid using the query parameter as it is
142
- not redacted from HTTP logs.
140
+ <p class="mb-4">Send an API-scoped token in the <code>Authorization: Bearer</code> header.
141
+ The <code>access_token</code> query parameter is also supported, but can expose the token in URL logs.
143
142
  </p>
144
143
 
145
- <pre class="ee-code-block">$ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v1/stats?access_token=&lt;token&gt;"
146
- $ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v1/stats" --header "Authorization: Bearer &lt;token&gt;"</pre>
144
+ <pre class="ee-code-block">$ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v1/stats" --header "Authorization: Bearer &lt;token&gt;"</pre>
147
145
 
148
- <p class="mt-4 mb-4">Prometheus endpoint at <code>/metrics</code> also requires an authorization
149
- token. Use the following configuration for setting up the token for a scraping endpoint:
146
+ <p class="mt-4 mb-4">To collect Prometheus metrics from <code>/metrics</code>, use a token with the Metrics scope
147
+ in your scrape configuration:
150
148
  </p>
151
149
 
152
150
  <pre class="ee-code-block">authorization:
@@ -166,4 +164,6 @@ $ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v
166
164
  </div>
167
165
  {{/ui/details}}
168
166
 
169
- {{> ui/delete-modal id="deleteToken" noun="access token" action="/admin/tokens/delete" fieldName="token"}}
167
+ {{#> ui/delete-modal id="deleteToken" noun="access token" action="/admin/tokens/delete" fieldName="token"}}
168
+ Delete <strong class="delete-target-name"></strong>? Apps and clients using this token will lose access immediately. This action cannot be undone.
169
+ {{/ui/delete-modal}}
@@ -10,11 +10,9 @@
10
10
  {{#unless canProvision}}
11
11
  {{#> ui/stat-card variant="error" title="Set an admin password first" icon="icon-[tabler--shield-lock]" class="mb-6"}}
12
12
 
13
- <p class="mb-4">Access tokens do not expire on their own, so EmailEngine only issues one to a request
14
- that carries an admin session. This instance has no admin password set, so there is no session to
15
- carry - set one and the form appears here.</p>
13
+ <p class="mb-4">Set an admin password and sign in to create access tokens. Tokens created here remain valid until you delete them.</p>
16
14
  <div>
17
- {{> ui/btn href="/admin/account/password" variant="primary" icon="icon-[tabler--arrow-right]" label="Enable authentication"}}
15
+ {{> ui/btn href="/admin/account/password" variant="primary" icon="icon-[tabler--arrow-right]" label="Set admin password"}}
18
16
  </div>
19
17
 
20
18
  {{/ui/stat-card}}
@@ -26,7 +24,7 @@
26
24
 
27
25
  <div class="card-body space-y-4">
28
26
 
29
- {{> ui/form-field id="description" label="Description" value=values.description error=errors.description required=true hint="This description is shown when listing active tokens."}}
27
+ {{> ui/form-field id="description" label="Description" value=values.description error=errors.description required=true hint="Describe the app or task that will use this token."}}
30
28
 
31
29
  {{!-- A search box rather than a select or free text: an instance can hold far more
32
30
  accounts than a list could usefully carry, and an account id is the one thing
@@ -35,13 +33,12 @@
35
33
  nothing. --}}
36
34
  {{> ui/account-picker id="account" label="Account (optional)" value=values.account selected=selectedAccount error=errors.account
37
35
  placeholder="Leave empty to allow all accounts"
38
- hint="A bound token only works for that one account. Requests made for any other account are refused."}}
36
+ hint="Limit this token to one account. Leave blank to allow access to all accounts within the selected scopes and permissions."}}
39
37
 
40
38
  <div>
41
39
  <h6 class="mb-1 font-bold">Allowed scopes</h6>
42
40
  <p class="text-base-content/60 text-sm mb-3">
43
- Which surfaces this credential opens. Scopes are fixed the moment the token exists, so
44
- a surface left out here cannot be added later.
41
+ Choose which EmailEngine interfaces this token can access. Scopes cannot be changed after creation.
45
42
  </p>
46
43
 
47
44
  {{!-- One line of plain words per row. The bracketed slug beside each was the only
@@ -57,7 +54,7 @@
57
54
  <label class="label-text grow p-0" for="scopesAll">All scopes</label>
58
55
  <div class="text-base-content/60 code-link">["*"]</div>
59
56
  </div>
60
- <p class="helper-text ms-7">Every surface below, including any added in a later release.</p>
57
+ <p class="helper-text ms-7">All interfaces below, including any added in future releases.</p>
61
58
  </li>
62
59
 
63
60
  <li class="p-4">
@@ -113,7 +110,7 @@
113
110
  </div>
114
111
  <p class="helper-text ms-7">Let an AI agent manage this instance through the MCP tools at
115
112
  <code>/mcp</code>: accounts, settings, OAuth2 applications, gateways, tokens and the license.
116
- This is not REST API access - the same token is refused by <code>/v1</code>.</p>
113
+ This scope does not grant REST API access.</p>
117
114
  </li>
118
115
 
119
116
  <li class="p-4">
@@ -125,8 +122,7 @@
125
122
  <div class="text-base-content/60 code-link">["mcp"]</div>
126
123
  </div>
127
124
  <p class="helper-text ms-7">Let an AI agent work with mailbox contents through the MCP tools at
128
- <code>/mcp</code>: list, read, organize and send mail. This is not REST API access - the same
129
- token is refused by <code>/v1</code>.</p>
125
+ <code>/mcp</code>: list, read, organize and send mail. This scope does not grant REST API access.</p>
130
126
  {{!-- The endpoint is off by default, so an operator can otherwise mint a
131
127
  credential for something that is not serving and only find out in the
132
128
  client. Both halves of the gate are folded into mcpReady. Revealed by
@@ -135,8 +131,8 @@
135
131
  selection ("All scopes") technically carries the mcp scope too. --}}
136
132
  {{#unless mcpReady}}
137
133
  <p id="mcpDisabledHint" class="helper-text ms-7 text-warning hidden">The MCP endpoint is not
138
- enabled on this instance, so this token would have nothing to talk to. <a
139
- href="/admin/config/mcp" class="link">Turn it on</a> first.</p>
134
+ enabled on this instance. <a href="/admin/config/mcp" class="link">Enable MCP</a>
135
+ before using this token with an MCP client.</p>
140
136
  {{/unless}}
141
137
  </li>
142
138
  </ul>
@@ -189,16 +185,16 @@
189
185
 
190
186
  {{!-- At the decision point, as on the MCP config page: the level chosen here is what
191
187
  decides whether instructions hidden inside received mail can act --}}
192
- <p class="text-base-content/60 text-sm">Email content flows into whatever model the connected client runs,
193
- and instructions inside received mail can steer it - grant sending and deleting rights deliberately.</p>
188
+ <p class="text-base-content/60 text-sm">The connected client may send email content to its AI model. Instructions in received emails can influence
189
+ the agent. Grant permission to send or delete email only when the agent needs it.</p>
194
190
  </fieldset>
195
191
 
196
192
  {{!-- API mode. Unrestricted by default, because an API token is the general-purpose
197
193
  credential and narrowing it is the exception. --}}
198
194
  <div id="apiLimitBlock" class="hidden">
199
195
  <p class="text-base-content/60 text-sm mb-3">
200
- By default this token can use the whole API. Restrict it to hand out a credential for a
201
- single job: an agent that reads mail but cannot delete it, or a service that can only send.
196
+ Limit this token to the actions its app or service needs, such as reading email or sending messages.
197
+ Without restrictions, it can use all operations allowed by its scopes and account selection.
202
198
  </p>
203
199
  {{> ui/checkbox id="permissionsEnabled" label="Restrict what this token can do" checked=values.permissionsEnabled error=errors.permissions noName=true}}
204
200
  </div>
@@ -228,7 +224,7 @@
228
224
  <div id="permissionPresetRow">
229
225
  <h6 class="mb-1 font-bold">Pick a preset</h6>
230
226
  <p class="text-base-content/60 text-sm mb-2">
231
- These cover the usual shapes. Adjust the details below if you need something else.
227
+ Start with a common set of permissions, then adjust the actions and sections below.
232
228
  </p>
233
229
  <div class="flex flex-wrap gap-2">
234
230
  {{#each permissionPresets}}
@@ -294,20 +290,20 @@
294
290
  </div>
295
291
 
296
292
  <div class="mb-6">
297
- {{> ui/btn label="Generate a token" type="submit" icon="icon-[tabler--key]"}}
293
+ {{> ui/btn label="Create access token" type="submit" icon="icon-[tabler--key]"}}
298
294
  </div>
299
295
  </form>
300
296
 
301
297
  {{!-- Wider than the default: the token is 64 characters and this is the only time it is shown, so
302
298
  it has to be readable in full rather than scrolled through a 32-character window. --}}
303
- {{#> ui/modal id="showToken" title="Access tokens" static=true dialogClass="max-w-2xl"}}
299
+ {{#> ui/modal id="showToken" title="Your access token" static=true dialogClass="max-w-2xl"}}
304
300
  <div class="modal-body">
305
301
  <div id="showTokenLoader" class="py-2 text-center">
306
302
  <span class="loading loading-spinner loading-sm align-middle"></span> Generating token&hellip;
307
303
  </div>
308
304
  <div id="showTokenContent" class="hidden">
309
305
 
310
- <div class="mb-2">Access token:</div>
306
+ <div class="mb-2">Copy and store this token securely. It will only be shown once.</div>
311
307
  {{!-- w-full because ui/copy-field's join wrapper is inline-flex, so the `grow` on the input
312
308
  has nothing to grow inside and the field kept its intrinsic width. text-sm so all 64
313
309
  characters fit: this is the only time the value is ever shown, and a token truncated at
@@ -11,7 +11,7 @@
11
11
  {{>webhook_form}}
12
12
 
13
13
  <div class="mb-6">
14
- {{> ui/btn label="Update webhook" type="submit" icon="icon-[tabler--device-floppy]"}}
14
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--device-floppy]"}}
15
15
  </div>
16
16
  </form>
17
17
 
@@ -1,11 +1,11 @@
1
- {{#> ui/page-header title="Webhook Routes" icon="icon-[tabler--webhook]" subtitle="Send HTTP callbacks to custom targets when email events match your filters." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
1
+ {{#> ui/page-header title="Webhook Routes" icon="icon-[tabler--webhook]" subtitle="Filter email events, customize their payloads, and send them to your chosen URLs." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
2
2
  {{> ui/btn href=newLink label="Create webhook route" icon="icon-[tabler--plus]"}}
3
3
  {{/ui/page-header}}
4
4
 
5
5
  {{> ui/search-crumb parentHref="/admin/webhooks" parentLabel="Webhook Routes" query=query}}
6
6
 
7
7
  {{#unless webhooksEnabled}}
8
- <div class="alert alert-soft alert-warning mb-6"><span><strong>Note:</strong> Webhook processing is currently disabled
8
+ <div class="alert alert-soft alert-warning mb-6"><span><strong>Note:</strong> Webhooks are disabled
9
9
  for EmailEngine.
10
10
  <a href="/admin/config/webhooks" class="link link-animated">Enable webhooks in configuration
11
11
  settings</a>.</span></div>
@@ -14,7 +14,7 @@
14
14
  {{#if webhooks}}
15
15
  <div class="card bg-base-100 shadow-md mb-6">
16
16
  <div class="overflow-x-auto">
17
- <table class="table">
17
+ <table class="table ee-table-stack">
18
18
  <thead>
19
19
  <tr>
20
20
  <th>Name</th>
@@ -34,15 +34,15 @@
34
34
  {{> ui/entity-id id=id label="Webhook Route ID"}}
35
35
  </td>
36
36
 
37
- <td class="relative">
37
+ <td class="relative" data-label="Description">
38
38
  {{> ui/row-link href=(concat "/admin/webhooks/webhook/" id)}}{{description}}
39
39
  </td>
40
40
 
41
- <td class="relative">
41
+ <td class="relative" data-label="Triggered">
42
42
  {{> ui/row-link href=(concat "/admin/webhooks/webhook/" id)}}{{tcount}}
43
43
  </td>
44
44
 
45
- <td class="relative">
45
+ <td class="relative" data-label="Status">
46
46
  {{> ui/row-link href=(concat "/admin/webhooks/webhook/" id)}}
47
47
  {{#if enabled}}
48
48
 
@@ -56,7 +56,7 @@
56
56
  {{/if}}
57
57
  </td>
58
58
 
59
- <td class="relative text-end">
59
+ <td class="ee-stack-actions relative text-end">
60
60
  {{> ui/row-actions openHref=(concat "/admin/webhooks/webhook/" id) label="Webhook route actions"
61
61
  deleteModal="#deleteWebhook" deleteId=id deleteName=name}}
62
62
  </td>
@@ -75,10 +75,9 @@
75
75
  {{#> ui/details summary="How webhook routes work" class="card bg-base-100 shadow-md mb-6"}}
76
76
  <div>
77
77
  <p class="mb-2">
78
- EmailEngine tests all events against <em>filter functions</em> of webhook routes. When
79
- a filter matches, EmailEngine sends a webhook to the target URL of that route. If
80
- the webhook target requires a specific payload format, you can define a <em>mapping
81
- function</em> to modify the payload before sending.
78
+ Each enabled route evaluates events with its filter function. When the filter returns <code>true</code>,
79
+ EmailEngine sends the event to the route's target URL. Add a map function to change the payload format.
80
+ Routes run independently of the default webhook target and its event selection.
82
81
  </p>
83
82
  <p class="mb-0"><a href="https://learn.emailengine.app/docs/integrations/low-code" target="_blank"
84
83
  rel="noopener noreferrer" referrerpolicy="no-referrer" class="link link-animated">Learn more about webhook
@@ -9,7 +9,7 @@
9
9
  {{>webhook_form}}
10
10
 
11
11
  <div class="mb-6">
12
- {{> ui/btn label="Create routing" type="submit" icon="icon-[tabler--plus]"}}
12
+ {{> ui/btn label="Create webhook route" type="submit" icon="icon-[tabler--plus]"}}
13
13
  </div>
14
14
  </form>
15
15
 
@@ -5,7 +5,7 @@
5
5
  {{#> ui/card}}
6
6
 
7
7
  {{#> ui/detail-toolbar label="Webhook route actions"}}
8
- {{#> ui/tooltip text="Edit Webhook Route contents"}}
8
+ {{#> ui/tooltip text="Edit webhook route settings"}}
9
9
  {{> ui/btn variant="primary" style="outline" size="sm" href=(concat "/admin/webhooks/webhook/" webhook.id "/edit") icon="icon-[tabler--file-pencil]" label="Edit route"}}
10
10
  {{/ui/tooltip}}
11
11
 
@@ -21,7 +21,7 @@
21
21
 
22
22
  {{#if webhook.webhookErrorFlag.message}}
23
23
  {{#> ui/clear-alert alert="webhook-route" entry=webhook.id class="mb-6"}}
24
- <p><strong>Warning:</strong> The last attempted webhook failed with the response below.</p>
24
+ <p><strong>Warning:</strong> The last webhook delivery attempt failed:</p>
25
25
  <hr class="my-2">
26
26
  <p class="mb-0">
27
27
  <code>
@@ -95,8 +95,7 @@
95
95
  <div id="errors" class="hidden" role="tabpanel" aria-labelledby="errors-tab">
96
96
 
97
97
 
98
- <p class="mb-4">The following errors were thrown when executing the functions for this route.
99
- Only the most recent errors are shown.</p>
98
+ <p class="mb-4">Recent errors from this route's filter and map functions:</p>
100
99
 
101
100
  <div class="overflow-x-auto">
102
101
  <table class="table">
@@ -146,7 +145,7 @@
146
145
 
147
146
  {{/ui/card}}
148
147
 
149
- {{#> ui/confirm-modal id="deleteModal" title="Delete Webhook Route" action="/admin/webhooks/delete"
148
+ {{#> ui/confirm-modal id="deleteModal" title="Delete webhook route" action="/admin/webhooks/delete"
150
149
  fieldName="webhook" fieldValue=webhook.id submitLabel="Delete route"}}
151
150
  <p>Are you sure you want to delete <strong>{{webhook.name}}</strong>? This action cannot be undone.</p>
152
151
  {{/ui/confirm-modal}}