@teamnetwork-nz/smtp-mcp-server 1.1.0 → 1.1.2

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/.env.example CHANGED
@@ -2,6 +2,7 @@
2
2
  SMTP_HOST=smtp.example.com
3
3
  SMTP_PORT=587
4
4
  SMTP_SECURE=false # set to "true" for port 465 implicit TLS
5
+ SMTP_IGNORE_TLS=false # set to "true" for plain SMTP with no TLS (e.g. port 25 internal relay)
5
6
  SMTP_USER=user@example.com # optional — omit for unauthenticated relays
6
7
  SMTP_PASS=your-password-here # optional — omit for unauthenticated relays
7
8
 
package/README.md CHANGED
@@ -42,6 +42,7 @@ All configuration is via environment variables (loaded from `.env` if present).
42
42
  | `SMTP_HOST` | yes | SMTP relay hostname |
43
43
  | `SMTP_PORT` | no | Port — default `587` |
44
44
  | `SMTP_SECURE` | no | `"true"` for port 465 implicit TLS; otherwise STARTTLS |
45
+ | `SMTP_IGNORE_TLS` | no | `"true"` to disable TLS entirely — plain SMTP, e.g. port 25 internal relay |
45
46
  | `SMTP_USER` | no | SMTP auth username — omit for unauthenticated relays |
46
47
  | `SMTP_PASS` | no | SMTP auth password — omit for unauthenticated relays |
47
48
  | `SMTP_FROM_ADDRESS` | yes | Envelope From address |
package/dist/config.js CHANGED
@@ -15,6 +15,10 @@ const configSchema = zod_1.z.object({
15
15
  .string()
16
16
  .transform((v) => v.toLowerCase() === "true")
17
17
  .default(false),
18
+ ignoreTls: zod_1.z
19
+ .string()
20
+ .transform((v) => v.toLowerCase() === "true")
21
+ .default(false),
18
22
  user: zod_1.z.string().min(1).optional(),
19
23
  pass: zod_1.z.string().min(1).optional(),
20
24
  }),
@@ -41,6 +45,7 @@ function loadConfig() {
41
45
  host: process.env.SMTP_HOST,
42
46
  port: process.env.SMTP_PORT,
43
47
  secure: process.env.SMTP_SECURE,
48
+ ignoreTls: process.env.SMTP_IGNORE_TLS,
44
49
  user: process.env.SMTP_USER,
45
50
  pass: process.env.SMTP_PASS,
46
51
  },
package/dist/email.js CHANGED
@@ -12,6 +12,7 @@ function createTransport(smtpConfig) {
12
12
  host: smtpConfig.host,
13
13
  port: smtpConfig.port,
14
14
  secure: smtpConfig.secure,
15
+ ignoreTLS: smtpConfig.ignoreTls,
15
16
  ...(smtpConfig.user && smtpConfig.pass
16
17
  ? { auth: { user: smtpConfig.user, pass: smtpConfig.pass } }
17
18
  : {}),
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
@@ -9,7 +10,7 @@ const email_js_1 = require("./email.js");
9
10
  const transport = (0, email_js_1.createTransport)(config_js_1.config.smtp);
10
11
  const server = new mcp_js_1.McpServer({
11
12
  name: "smtp-mcp",
12
- version: "1.1.0",
13
+ version: "1.1.2",
13
14
  });
14
15
  // ---------------------------------------------------------------------------
15
16
  // Shared schemas
@@ -57,7 +58,7 @@ server.registerTool("health", {
57
58
  const lines = [
58
59
  `connection: ${connectionStatus}`,
59
60
  `smtp_host: ${config_js_1.config.smtp.host}:${config_js_1.config.smtp.port}`,
60
- `tls: ${config_js_1.config.smtp.secure ? "implicit (port 465)" : "STARTTLS"}`,
61
+ `tls: ${config_js_1.config.smtp.secure ? "implicit TLS" : config_js_1.config.smtp.ignoreTls ? "none (plain SMTP)" : "STARTTLS"}`,
61
62
  `auth: ${config_js_1.config.smtp.user ? `authenticated as ${config_js_1.config.smtp.user}` : "unauthenticated"}`,
62
63
  `from: "${config_js_1.config.from.name}" <${config_js_1.config.from.address}>`,
63
64
  `restrictions: ${restrictionSummary}`,
@@ -172,7 +173,7 @@ SENDER IDENTITY
172
173
  SMTP ENDPOINT
173
174
  Host: ${config_js_1.config.smtp.host}
174
175
  Port: ${config_js_1.config.smtp.port}
175
- TLS: ${config_js_1.config.smtp.secure ? "implicit (port 465)" : "STARTTLS"}
176
+ TLS: ${config_js_1.config.smtp.secure ? "implicit TLS" : config_js_1.config.smtp.ignoreTls ? "none (plain SMTP)" : "STARTTLS"}
176
177
  Auth: ${config_js_1.config.smtp.user ? "enabled" : "none"}
177
178
 
178
179
  ${restrictionSection}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamnetwork-nz/smtp-mcp-server",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "MCP server for sending email via SMTP relay",
5
5
  "main": "dist/index.js",
6
6
  "bin": {