@uniora/mailer-smtp 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,91 +1,91 @@
1
- Required Notice: Copyright 2026 CodexSploitx (https://github.com/CodexSploitx/uniora)
2
-
3
- # PolyForm Shield License 1.0.0
4
-
5
- <https://polyformproject.org/licenses/shield/1.0.0>
6
-
7
- ## Acceptance
8
-
9
- In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
10
-
11
- ## Copyright License
12
-
13
- The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
14
-
15
- ## Distribution License
16
-
17
- The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
18
-
19
- ## Notices
20
-
21
- You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
22
-
23
- > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
24
-
25
- ## Changes and New Works License
26
-
27
- The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
28
-
29
- ## Patent License
30
-
31
- The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
32
-
33
- ## Noncompete
34
-
35
- Any purpose is a permitted purpose, except for providing any product that competes with the software or any product the licensor or any of its affiliates provides using the software.
36
-
37
- ## Competition
38
-
39
- Goods and services compete even when they provide functionality through different kinds of interfaces or for different technical platforms. Applications can compete with services, libraries with plugins, frameworks with development tools, and so on, even if they're written in different programming languages or for different computer architectures. Goods and services compete even when provided free of charge. If you market a product as a practical substitute for the software or another product, it definitely competes.
40
-
41
- ## New Products
42
-
43
- If you are using the software to provide a product that does not compete, but the licensor or any of its affiliates brings your product into competition by providing a new version of the software or another product using the software, you may continue using versions of the software available under these terms beforehand to provide your competing product, but not any later versions.
44
-
45
- ## Discontinued Products
46
-
47
- You may begin using the software to compete with a product or service that the licensor or any of its affiliates has stopped providing, unless the licensor includes a plain-text line beginning with `Licensor Line of Business:` with the software that mentions that line of business. For example:
48
-
49
- > Licensor Line of Business: YoyodyneCMS Content Management System (http://example.com/cms)
50
-
51
- ## Sales of Business
52
-
53
- If the licensor or any of its affiliates sells a line of business developing the software or using the software to provide a product, the buyer can also enforce [Noncompete](#noncompete) for that product.
54
-
55
- ## Fair Use
56
-
57
- You may have "fair use" rights for the software under the law. These terms do not limit them.
58
-
59
- ## No Other Rights
60
-
61
- These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
62
-
63
- ## Patent Defense
64
-
65
- If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
66
-
67
- ## Violations
68
-
69
- The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
70
-
71
- ## No Liability
72
-
73
- ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
74
-
75
- ## Definitions
76
-
77
- The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
78
-
79
- A **product** can be a good or service, or a combination of them.
80
-
81
- **You** refers to the individual or entity agreeing to these terms.
82
-
83
- **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all its affiliates.
84
-
85
- **Affiliates** means the other organizations than an organization has control over, is under the control of, or is under common control with.
86
-
87
- **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
88
-
89
- **Your licenses** are all the licenses granted to you for the software under these terms.
90
-
91
- **Use** means anything you do with the software requiring one of your licenses.
1
+ Required Notice: Copyright 2026 CodexSploitx (https://github.com/CodexSploitx/uniora)
2
+
3
+ # PolyForm Shield License 1.0.0
4
+
5
+ <https://polyformproject.org/licenses/shield/1.0.0>
6
+
7
+ ## Acceptance
8
+
9
+ In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
10
+
11
+ ## Copyright License
12
+
13
+ The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
14
+
15
+ ## Distribution License
16
+
17
+ The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
18
+
19
+ ## Notices
20
+
21
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
22
+
23
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
24
+
25
+ ## Changes and New Works License
26
+
27
+ The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
28
+
29
+ ## Patent License
30
+
31
+ The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
32
+
33
+ ## Noncompete
34
+
35
+ Any purpose is a permitted purpose, except for providing any product that competes with the software or any product the licensor or any of its affiliates provides using the software.
36
+
37
+ ## Competition
38
+
39
+ Goods and services compete even when they provide functionality through different kinds of interfaces or for different technical platforms. Applications can compete with services, libraries with plugins, frameworks with development tools, and so on, even if they're written in different programming languages or for different computer architectures. Goods and services compete even when provided free of charge. If you market a product as a practical substitute for the software or another product, it definitely competes.
40
+
41
+ ## New Products
42
+
43
+ If you are using the software to provide a product that does not compete, but the licensor or any of its affiliates brings your product into competition by providing a new version of the software or another product using the software, you may continue using versions of the software available under these terms beforehand to provide your competing product, but not any later versions.
44
+
45
+ ## Discontinued Products
46
+
47
+ You may begin using the software to compete with a product or service that the licensor or any of its affiliates has stopped providing, unless the licensor includes a plain-text line beginning with `Licensor Line of Business:` with the software that mentions that line of business. For example:
48
+
49
+ > Licensor Line of Business: YoyodyneCMS Content Management System (http://example.com/cms)
50
+
51
+ ## Sales of Business
52
+
53
+ If the licensor or any of its affiliates sells a line of business developing the software or using the software to provide a product, the buyer can also enforce [Noncompete](#noncompete) for that product.
54
+
55
+ ## Fair Use
56
+
57
+ You may have "fair use" rights for the software under the law. These terms do not limit them.
58
+
59
+ ## No Other Rights
60
+
61
+ These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
62
+
63
+ ## Patent Defense
64
+
65
+ If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
66
+
67
+ ## Violations
68
+
69
+ The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
70
+
71
+ ## No Liability
72
+
73
+ ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
74
+
75
+ ## Definitions
76
+
77
+ The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
78
+
79
+ A **product** can be a good or service, or a combination of them.
80
+
81
+ **You** refers to the individual or entity agreeing to these terms.
82
+
83
+ **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all its affiliates.
84
+
85
+ **Affiliates** means the other organizations than an organization has control over, is under the control of, or is under common control with.
86
+
87
+ **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
88
+
89
+ **Your licenses** are all the licenses granted to you for the software under these terms.
90
+
91
+ **Use** means anything you do with the software requiring one of your licenses.
package/README.md CHANGED
@@ -1,41 +1,43 @@
1
- # @uniora/mailer-smtp
2
-
3
- SMTP delivery for [UNIORA](https://github.com/CodexSploitx/uniora) invitations. It implements `InvitationSender` from `@uniora/core`, reads its settings from `UNIORA_SMTP_*` environment variables and ships professional, responsive, dark-mode-aware templates in English, Spanish, Portuguese, French, German and Italian.
4
-
5
- ```ts
6
- import { createInvitationService } from "@uniora/core";
7
- import { createSmtpInvitationSenderFromEnv } from "@uniora/mailer-smtp";
8
-
9
- const sender = createSmtpInvitationSenderFromEnv(process.env, {
10
- brandName: "Acme",
11
- brandColor: "#0f766e",
12
- logoUrl: "https://acme.com/logo.png",
13
- supportEmail: "help@acme.com",
14
- resolveInviterName: async (identity) => (await db.users.find(identity.subject))?.name,
15
- });
16
- await sender.verify(); // optional startup check: connects and authenticates
17
-
18
- const invitations = createInvitationService({ storage, sender, acceptUrl: (t) => `https://app.acme.com/invite/${t}` });
19
- ```
20
-
21
- ## Configuration
22
-
23
- | Variable | Default | |
24
- | --- | --- | --- |
25
- | `UNIORA_SMTP_HOST` | — | **required**, bare host name |
26
- | `UNIORA_SMTP_PORT` | `587` | `465` uses implicit TLS, otherwise STARTTLS |
27
- | `UNIORA_SMTP_SECURE` | `true` only on 465 | force implicit TLS |
28
- | `UNIORA_SMTP_USER` / `UNIORA_SMTP_PASS` | — | both or neither |
29
- | `UNIORA_SMTP_FROM` | — | **required**, `Name <addr>` or `addr` |
30
- | `UNIORA_SMTP_REPLY_TO` | — | optional |
31
- | `UNIORA_SMTP_REQUIRE_TLS` | `true` | refuse to send unencrypted |
32
- | `UNIORA_SMTP_TLS_REJECT_UNAUTHORIZED` | `true` | verify the server certificate |
33
-
34
- Anything missing or malformed throws one `SmtpConfigError` listing every problem — at startup, not on the first invitation.
35
-
36
- ## Behaviour
37
-
38
- - **Retries, timeouts and bookkeeping** are done by `createInvitationService`; this package classifies failures: bad credentials and any `5xx`/rejected recipient are permanent (no retry), network errors and `4xx` are transient.
39
- - **Templates are safe by construction**: every interpolated value is escaped, the Subject is forced onto one line, the link must be `http(s)`, the logo `https`, the brand color a `#rrggbb`.
40
- - **Own template?** Pass `template: (message, context) => ({ subject, html, text })`. **Own provider?** Implement `InvitationSender` yourself — nothing else in UNIORA changes.
41
- - Each message carries `Auto-Submitted: auto-generated` and an `X-Entity-Ref-ID` (invitation id + attempt) for correlating provider logs. The token never appears in headers or logs.
1
+ # @uniora/mailer-smtp
2
+
3
+ SMTP delivery for [UNIORA](https://github.com/CodexSploitx/uniora) invitations. It implements `InvitationSender` from `@uniora/core`, reads its settings from `UNIORA_SMTP_*` environment variables and ships professional, responsive, dark-mode-aware templates in English, Spanish, Portuguese, French, German and Italian.
4
+
5
+ ```ts
6
+ import { createInvitationService } from "@uniora/core";
7
+ import { createSmtpInvitationSenderFromEnv } from "@uniora/mailer-smtp";
8
+
9
+ const sender = createSmtpInvitationSenderFromEnv(process.env, {
10
+ brandName: "Acme",
11
+ brandColor: "#0f766e",
12
+ logoUrl: "https://acme.com/logo.png",
13
+ supportEmail: "help@acme.com",
14
+ resolveInviterName: async (identity) => (await db.users.find(identity.subject))?.name,
15
+ });
16
+ await sender.verify(); // optional startup check: connects and authenticates
17
+
18
+ const invitations = createInvitationService({ storage, sender, acceptUrl: (t) => `https://app.acme.com/invite/${t}` });
19
+ ```
20
+
21
+ ## Configuration
22
+
23
+ | Variable | Default | |
24
+ | --- | --- | --- |
25
+ | `UNIORA_SMTP_HOST` | — | **required**, bare host name |
26
+ | `UNIORA_SMTP_PORT` | `587` | `465` uses implicit TLS, otherwise STARTTLS |
27
+ | `UNIORA_SMTP_SECURE` | `true` only on 465 | force implicit TLS |
28
+ | `UNIORA_SMTP_USER` / `UNIORA_SMTP_PASS` | — | both or neither |
29
+ | `UNIORA_SMTP_FROM` | — | **required**, `Name <addr>` or `addr` |
30
+ | `UNIORA_SMTP_REPLY_TO` | — | optional |
31
+ | `UNIORA_SMTP_REQUIRE_TLS` | `true` | refuse to send unencrypted |
32
+ | `UNIORA_SMTP_TLS_REJECT_UNAUTHORIZED` | `true` | verify the server certificate |
33
+
34
+ Anything missing or malformed throws one `SmtpConfigError` listing every problem — at startup, not on the first invitation.
35
+
36
+ ## Behaviour
37
+
38
+ - **Retries, timeouts and bookkeeping** are done by `createInvitationService`; this package classifies failures: bad credentials and any `5xx`/rejected recipient are permanent (no retry), network errors and `4xx` are transient.
39
+ - **Templates are safe by construction**: every interpolated value is escaped, the Subject is forced onto one line, the link must be `http(s)`, the logo `https`, the brand color a `#rrggbb`.
40
+ - **Own template?** Pass `template: (message, context) => ({ subject, html, text })`. **Own provider?** Implement `InvitationSender` yourself — nothing else in UNIORA changes.
41
+ - Each message carries `Auto-Submitted: auto-generated` and an `X-Entity-Ref-ID` (invitation id + attempt) for correlating provider logs. The token never appears in headers or logs.
42
+
43
+ Documentation: [Invitations guide](https://github.com/CodexSploitx/uniora/blob/main/guides/invitations.md) and the [full index](https://github.com/CodexSploitx/uniora/blob/main/guides/README.md).
package/dist/templates.js CHANGED
@@ -89,58 +89,58 @@ export function renderInvitationEmail(message, context = {}) {
89
89
  ? `<img src="${e(logoUrl)}" alt="${e(brand)}" height="32" style="display:block;border:0;height:32px;width:auto;max-width:180px;">`
90
90
  : `<span style="font-size:18px;font-weight:700;letter-spacing:.2px;color:#111827;" class="ink">${e(brand)}</span>`;
91
91
  const roleBlock = roles.length
92
- ? `<tr><td style="padding:0 40px 24px 40px;">
93
- <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" class="panel" style="background:#f3f4f6;border-radius:10px;">
94
- <tr><td style="padding:14px 18px;font-size:13px;line-height:20px;color:#6b7280;" class="muted">${e(roleLabel)}</td></tr>
95
- <tr><td style="padding:0 18px 14px 18px;font-size:15px;line-height:22px;font-weight:600;color:#111827;" class="ink">${roles.map(e).join(" · ")}</td></tr>
96
- </table>
92
+ ? `<tr><td style="padding:0 40px 24px 40px;">
93
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" class="panel" style="background:#f3f4f6;border-radius:10px;">
94
+ <tr><td style="padding:14px 18px;font-size:13px;line-height:20px;color:#6b7280;" class="muted">${e(roleLabel)}</td></tr>
95
+ <tr><td style="padding:0 18px 14px 18px;font-size:15px;line-height:22px;font-weight:600;color:#111827;" class="ink">${roles.map(e).join(" · ")}</td></tr>
96
+ </table>
97
97
  </td></tr>`
98
98
  : "";
99
- const html = `<!doctype html>
100
- <html lang="${locale}" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
101
- <head>
102
- <meta charset="utf-8">
103
- <meta name="viewport" content="width=device-width, initial-scale=1">
104
- <meta name="color-scheme" content="light dark">
105
- <meta name="supported-color-schemes" content="light dark">
106
- <title>${e(subject)}</title>
107
- <!--[if mso]><noscript><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml></noscript><![endif]-->
108
- <style>
109
- body,table,td,a{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
110
- table,td{mso-table-lspace:0;mso-table-rspace:0;}
111
- img{-ms-interpolation-mode:bicubic;}
112
- @media (max-width:620px){ .container{width:100%!important;} .px{padding-left:24px!important;padding-right:24px!important;} }
113
- @media (prefers-color-scheme:dark){
114
- .bg{background:#0b0f19!important;} .card{background:#111827!important;border-color:#1f2937!important;}
115
- .ink{color:#f9fafb!important;} .body{color:#d1d5db!important;} .muted{color:#9ca3af!important;}
116
- .panel{background:#1f2937!important;} .rule{border-top-color:#1f2937!important;} .link{color:#a5b4fc!important;}
117
- }
118
- </style>
119
- </head>
120
- <body class="bg" style="margin:0;padding:0;background:#f4f5f7;">
121
- <div style="display:none;max-height:0;overflow:hidden;opacity:0;color:transparent;mso-hide:all;">${e(preheader)}&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>
122
- <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" class="bg" style="background:#f4f5f7;">
123
- <tr><td align="center" style="padding:32px 16px;">
124
- <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="560" class="container card" style="width:560px;max-width:560px;background:#ffffff;border:1px solid #e5e7eb;border-radius:14px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;">
125
- <tr><td class="px" style="padding:28px 40px 20px 40px;border-bottom:3px solid ${color};border-radius:14px 14px 0 0;">${header}</td></tr>
126
- <tr><td class="px ink" style="padding:32px 40px 8px 40px;font-size:24px;line-height:32px;font-weight:700;color:#111827;">${e(heading)}</td></tr>
127
- <tr><td class="px body" style="padding:8px 40px 24px 40px;font-size:16px;line-height:26px;color:#374151;">${introHtml}</td></tr>
128
- ${roleBlock}
129
- <tr><td class="px" align="left" style="padding:0 40px 24px 40px;">
130
- <!--[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" href="${url}" style="height:48px;v-text-anchor:middle;width:240px;" arcsize="20%" stroke="f" fillcolor="${color}"><w:anchorlock xmlns:w="urn:schemas-microsoft-com:office:word"/><center style="color:${onColor};font-family:Arial,sans-serif;font-size:16px;font-weight:bold;">${e(t.button)}</center></v:roundrect><![endif]-->
131
- <!--[if !mso]><!-- --><a href="${url}" target="_blank" rel="noopener" style="display:inline-block;background:${color};color:${onColor};font-size:16px;line-height:48px;font-weight:600;text-decoration:none;padding:0 32px;border-radius:10px;mso-hide:all;">${e(t.button)}</a><!--<![endif]-->
132
- </td></tr>
133
- <tr><td class="px muted" style="padding:0 40px 8px 40px;font-size:14px;line-height:22px;color:#6b7280;">${e(expires)}</td></tr>
134
- <tr><td class="px muted" style="padding:16px 40px 4px 40px;font-size:13px;line-height:20px;color:#6b7280;">${e(t.fallback)}</td></tr>
135
- <tr><td class="px" style="padding:0 40px 24px 40px;font-size:13px;line-height:20px;word-break:break-all;"><a class="link" href="${url}" style="color:${color};text-decoration:underline;">${url}</a></td></tr>
136
- <tr><td class="px" style="padding:0 40px;"><div class="rule" style="border-top:1px solid #e5e7eb;font-size:0;line-height:0;">&nbsp;</div></td></tr>
137
- <tr><td class="px muted" style="padding:20px 40px 6px 40px;font-size:13px;line-height:20px;color:#6b7280;">${e(t.ignore)}</td></tr>
138
- <tr><td class="px muted" style="padding:6px 40px ${help ? "6px" : "28px"} 40px;font-size:12px;line-height:18px;color:#9ca3af;">${e(sentBy)}</td></tr>
139
- ${help ? `<tr><td class="px muted" style="padding:0 40px 28px 40px;font-size:12px;line-height:18px;color:#9ca3af;">${e(help)}</td></tr>` : ""}
140
- </table>
141
- </td></tr>
142
- </table>
143
- </body>
99
+ const html = `<!doctype html>
100
+ <html lang="${locale}" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
101
+ <head>
102
+ <meta charset="utf-8">
103
+ <meta name="viewport" content="width=device-width, initial-scale=1">
104
+ <meta name="color-scheme" content="light dark">
105
+ <meta name="supported-color-schemes" content="light dark">
106
+ <title>${e(subject)}</title>
107
+ <!--[if mso]><noscript><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml></noscript><![endif]-->
108
+ <style>
109
+ body,table,td,a{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
110
+ table,td{mso-table-lspace:0;mso-table-rspace:0;}
111
+ img{-ms-interpolation-mode:bicubic;}
112
+ @media (max-width:620px){ .container{width:100%!important;} .px{padding-left:24px!important;padding-right:24px!important;} }
113
+ @media (prefers-color-scheme:dark){
114
+ .bg{background:#0b0f19!important;} .card{background:#111827!important;border-color:#1f2937!important;}
115
+ .ink{color:#f9fafb!important;} .body{color:#d1d5db!important;} .muted{color:#9ca3af!important;}
116
+ .panel{background:#1f2937!important;} .rule{border-top-color:#1f2937!important;} .link{color:#a5b4fc!important;}
117
+ }
118
+ </style>
119
+ </head>
120
+ <body class="bg" style="margin:0;padding:0;background:#f4f5f7;">
121
+ <div style="display:none;max-height:0;overflow:hidden;opacity:0;color:transparent;mso-hide:all;">${e(preheader)}&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>
122
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" class="bg" style="background:#f4f5f7;">
123
+ <tr><td align="center" style="padding:32px 16px;">
124
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="560" class="container card" style="width:560px;max-width:560px;background:#ffffff;border:1px solid #e5e7eb;border-radius:14px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;">
125
+ <tr><td class="px" style="padding:28px 40px 20px 40px;border-bottom:3px solid ${color};border-radius:14px 14px 0 0;">${header}</td></tr>
126
+ <tr><td class="px ink" style="padding:32px 40px 8px 40px;font-size:24px;line-height:32px;font-weight:700;color:#111827;">${e(heading)}</td></tr>
127
+ <tr><td class="px body" style="padding:8px 40px 24px 40px;font-size:16px;line-height:26px;color:#374151;">${introHtml}</td></tr>
128
+ ${roleBlock}
129
+ <tr><td class="px" align="left" style="padding:0 40px 24px 40px;">
130
+ <!--[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" href="${url}" style="height:48px;v-text-anchor:middle;width:240px;" arcsize="20%" stroke="f" fillcolor="${color}"><w:anchorlock xmlns:w="urn:schemas-microsoft-com:office:word"/><center style="color:${onColor};font-family:Arial,sans-serif;font-size:16px;font-weight:bold;">${e(t.button)}</center></v:roundrect><![endif]-->
131
+ <!--[if !mso]><!-- --><a href="${url}" target="_blank" rel="noopener" style="display:inline-block;background:${color};color:${onColor};font-size:16px;line-height:48px;font-weight:600;text-decoration:none;padding:0 32px;border-radius:10px;mso-hide:all;">${e(t.button)}</a><!--<![endif]-->
132
+ </td></tr>
133
+ <tr><td class="px muted" style="padding:0 40px 8px 40px;font-size:14px;line-height:22px;color:#6b7280;">${e(expires)}</td></tr>
134
+ <tr><td class="px muted" style="padding:16px 40px 4px 40px;font-size:13px;line-height:20px;color:#6b7280;">${e(t.fallback)}</td></tr>
135
+ <tr><td class="px" style="padding:0 40px 24px 40px;font-size:13px;line-height:20px;word-break:break-all;"><a class="link" href="${url}" style="color:${color};text-decoration:underline;">${url}</a></td></tr>
136
+ <tr><td class="px" style="padding:0 40px;"><div class="rule" style="border-top:1px solid #e5e7eb;font-size:0;line-height:0;">&nbsp;</div></td></tr>
137
+ <tr><td class="px muted" style="padding:20px 40px 6px 40px;font-size:13px;line-height:20px;color:#6b7280;">${e(t.ignore)}</td></tr>
138
+ <tr><td class="px muted" style="padding:6px 40px ${help ? "6px" : "28px"} 40px;font-size:12px;line-height:18px;color:#9ca3af;">${e(sentBy)}</td></tr>
139
+ ${help ? `<tr><td class="px muted" style="padding:0 40px 28px 40px;font-size:12px;line-height:18px;color:#9ca3af;">${e(help)}</td></tr>` : ""}
140
+ </table>
141
+ </td></tr>
142
+ </table>
143
+ </body>
144
144
  </html>`;
145
145
  const text = [
146
146
  heading,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniora/mailer-smtp",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "SMTP delivery for UNIORA invitations: configured from .env, with professional multilingual e-mail templates",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "keywords": [
@@ -39,10 +39,10 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "nodemailer": "^10.0.6",
42
- "@uniora/core": "^0.3.0"
42
+ "@uniora/core": "^0.4.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "^22.10.2",
45
+ "@types/node": "^26.6.4",
46
46
  "@types/smtp-server": "^3.5.13",
47
47
  "smtp-server": "^3.19.17",
48
48
  "typescript": "^5.6.3",