Skip to main content

node-wire-smtp

SMTP connector for Node Wire. Lets an agent or app send email through a relay that is pinned on the server, so a caller can choose the recipients and content but never the mail server.

Part of Node Wire. Every call runs through the Node Wire runtime, so it gets input validation, retries with a circuit breaker, scope policy, a shared error taxonomy, and OpenTelemetry tracing. A Node Wire host exposes each action over REST, gRPC and MCP.

Install

pip install node-wire-smtp

This pulls in node-wire-runtime. Pre-releases are published as X.Y.ZbN; install one with pip install --pre node-wire-smtp. To install every connector at once, use node-wire-connectors.

The wheel is pure Python (py3-none-any) and installs on CPython 3.11, 3.12 and 3.13 on any OS and CPU.

Actions

The connector registers as smtp. MCP tool names are <connector_id>_<action>, with dots replaced by underscores.

Action MCP tool What it does
send_email smtp_send_email Sends a plain-text email to one or more recipients (to, subject, body, optional from_email)

When from_email is omitted, the sender is FROM_EMAIL, then SMTP_USERNAME.

Configuration

Add the connector to config/connectors.yaml:

connectors:
  smtp:
    enabled: true
    exposed_via: ["rest", "grpc", "mcp"]
    auth:
      provider: static_credentials
      username_secret: SMTP_USERNAME
      password_secret: SMTP_PASSWORD

The relay is configured only through the environment. Credentials are read through the configured secret provider (environment variables by default):

Variable Purpose
SMTP_HOST Relay hostname (default smtp.gmail.com)
SMTP_PORT Relay port (default 587)
SMTP_USE_TLS Upgrade the connection with STARTTLS (default true). Port 465 always uses implicit TLS
SMTP_USERNAME Relay login
SMTP_PASSWORD Relay password or app password
FROM_EMAIL Default sender address
NW_SMTP_ALLOWED_HOSTS Optional. Comma-separated relay hostnames; the connector refuses to send if SMTP_HOST is not listed

Usage

Set NW_ALLOWED_CONNECTORS=smtp (comma-separate several). Node Wire loads only the connectors listed there, and discovers them through the node_wire.connectors entry point. A Node Wire host (the REST, gRPC or MCP server, or ConnectorFactory) then builds the connector from the configuration above. See Use a connector.

Security notes

  • The payload cannot set the relay host, port or TLS mode; those fields are dropped. Relay credentials therefore never go to a host chosen by the caller.
  • Set NW_SMTP_ALLOWED_HOSTS in production.
  • subject may not contain newlines or control characters, which blocks header injection.

Documentation

License

Apache-2.0. See LICENSE.

Metadata

Release files for node-wire-smtp 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for node-wire-smtp 1.1.0
File Interpreter ABI Platform
node_wire_smtp-1.1.0-py3-none-any.whl Python 3 none any Details

Release files / node_wire_smtp-1.1.0-py3-none-any.whl

Download URL node_wire_smtp-1.1.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dea5a1bbbe83be2424b0ad7a8037714cf1a94e5f6ae2ce0ebcc6199be3406d99
BLAKE2b-256 checksum
How to use checksums
5efedf0b0ce28cb162737a3635e453d86af84187f4fad1faa3e5840073ec02e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for node-wire-smtp 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 1 file in this release has been uploaded with provenance metadata.

Attestation for node_wire_smtp-1.1.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page