{"_id":"@compeso/node-red-contrib-smtp-email","_rev":"3-d7be7305dc7b166f0a3281cc0d8d1a22","name":"@compeso/node-red-contrib-smtp-email","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"@compeso/node-red-contrib-smtp-email","version":"0.1.0","keywords":["node-red","smtp","email","mail"],"_id":"@compeso/node-red-contrib-smtp-email@0.1.0","maintainers":[{"name":"harpau","email":"hpaulus@compeso.com"}],"homepage":"https://github.com/Harpau/node-red-contrib-smtp-email#readme","bugs":{"url":"https://github.com/Harpau/node-red-contrib-smtp-email/issues"},"dist":{"shasum":"ef5e6028d63963e941573f047d06e9236199c636","tarball":"https://registry.npmjs.org/@compeso/node-red-contrib-smtp-email/-/node-red-contrib-smtp-email-0.1.0.tgz","fileCount":9,"integrity":"sha512-2Z8qYG3kDonzJZlOrgKpNaiTz0FkBkljCHVkJA1RMsOzbYsOGf+UYLg6NaQVbC5AyKng0sfr0b6Rd6ysxlKy/g==","signatures":[{"sig":"MEUCIGKnF0qsiTnPtyNAF47n0bsI9UZEiS0NRYgDaSRG9ftnAiEAh9kHdCWV6aBMRb7kOcdNqPjaNSglQZF2Y7alPJ7CKh4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29062},"type":"commonjs","engines":{"node":">=22.0.0","node-red":">=4.0.0"},"gitHead":"7b1eeab8d992828d727d1b976a68c6e86fbf1e37","scripts":{"test":"node --test","pack:check":"npm pack --dry-run"},"_npmUser":{"name":"harpau","email":"hpaulus@compeso.com"},"node-red":{"nodes":{"smtp-email send":"nodes/smtp-email-send.js","smtp-email account":"nodes/smtp-email-account.js"}},"repository":{"url":"git+https://github.com/Harpau/node-red-contrib-smtp-email.git","type":"git"},"_npmVersion":"10.9.2","description":"SMTP email send node for Node-RED.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"nodemailer":"^9.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/node-red-contrib-smtp-email_0.1.0_1782073154062_0.12515992018077804","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@compeso/node-red-contrib-smtp-email","version":"1.0.0","keywords":["node-red","smtp","email","mail"],"license":"MIT","_id":"@compeso/node-red-contrib-smtp-email@1.0.0","maintainers":[{"name":"harpau","email":"hpaulus@compeso.com"}],"homepage":"https://github.com/Harpau/node-red-contrib-smtp-email#readme","bugs":{"url":"https://github.com/Harpau/node-red-contrib-smtp-email/issues"},"dist":{"shasum":"68b05dce7fa38205d5fad4bef8f34fa69d3bd4fc","tarball":"https://registry.npmjs.org/@compeso/node-red-contrib-smtp-email/-/node-red-contrib-smtp-email-1.0.0.tgz","fileCount":11,"integrity":"sha512-4idkP1FWp1KiuLRU9iqDYF2OOEyaWUlyZKSo/wHgcS8d8vyHMCIz9f9ZYF6tlLbsQrwKle7g2ABnkExX2Z+0AQ==","signatures":[{"sig":"MEUCIQDpg4uKo7q8nzdlGvST7l0n7az9K0cKQ5eTfbIWKLZ4ZAIgUms2VKHb2FfyTFEGkx1iv8Pb1jUIXq/bw5le/aEsj7c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDDTpXX6GHj2v/t2MfMeDAB+o2tKCnJnDb560aAdSO19wIhAKiqTTC+eX81SZKobh5VqjpkcSxCwl7yQ3FkNb1lIXZI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42951},"type":"commonjs","engines":{"node":">=22.0.0","node-red":">=4.0.0"},"gitHead":"90ce5098b602c18efbc8dd9ef84dc40c7bbec256","scripts":{"test":"node --test","pack:check":"npm pack --dry-run"},"_npmUser":{"name":"harpau","email":"hpaulus@compeso.com"},"node-red":{"nodes":{"smtp-email send":"nodes/smtp-email-send.js","smtp-email account":"nodes/smtp-email-account.js"},"version":">=4.0.0"},"repository":{"url":"git+https://github.com/Harpau/node-red-contrib-smtp-email.git","type":"git"},"_npmVersion":"10.9.2","description":"SMTP email send node for Node-RED.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"nodemailer":"^9.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/node-red-contrib-smtp-email_1.0.0_1789503177255_0.19490388576221918","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"_id":"@compeso/node-red-contrib-smtp-email@1.0.1","bugs":{"url":"https://github.com/Harpau/node-red-contrib-smtp-email/issues"},"dist":{"shasum":"6c0f1449d73dc11188541a57f1e6ccae0eeda8a4","tarball":"https://registry.npmjs.org/@compeso/node-red-contrib-smtp-email/-/node-red-contrib-smtp-email-1.0.1.tgz","fileCount":11,"integrity":"sha512-Fft+EofWrb3LG2Lx8RxjLmDVSFqqjgupV+sX9DnvpOmLYNX1NuSqtNDaDpWwH69eTTiSna7KtjcHsCU6fNLrjg==","signatures":[{"sig":"MEUCIQCWLeAID4P8L7RhQr0WAjTecgiCPllSaZzgFfZgmp7gJgIgJZ6952fvDEsKwq+VPUvFhPQDtSIly/OFN/u8Z5I+vbc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDHrfwm7gjhPH9jbfQDY7+9+RQbg7XokM5rZbsFCJI+1AiB/a2yDn0qtK93eP2oxiwuI7ozKDK1/VhfSJ9FZKNiS8g=="}],"unpackedSize":43209},"name":"@compeso/node-red-contrib-smtp-email","type":"commonjs","engines":{"node":">=22.0.0","node-red":">=4.0.0"},"gitHead":"8d27a7ea5010ac8e5792baebc4f570eeecdb9202","license":"MIT","scripts":{"test":"node --test","pack:check":"npm pack --dry-run"},"version":"1.0.1","_npmUser":{"name":"harpau","email":"hpaulus@compeso.com"},"homepage":"https://github.com/Harpau/node-red-contrib-smtp-email#readme","keywords":["node-red","smtp","email","mail"],"node-red":{"nodes":{"smtp-email send":"nodes/smtp-email-send.js","smtp-email account":"nodes/smtp-email-account.js"},"version":">=4.0.0"},"repository":{"url":"git+https://github.com/Harpau/node-red-contrib-smtp-email.git","type":"git"},"_npmVersion":"10.9.2","description":"SMTP email send node for Node-RED.","directories":{},"maintainers":[{"name":"harpau","email":"hpaulus@compeso.com"}],"_nodeVersion":"22.14.0","dependencies":{"nodemailer":"^10.0.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-red-contrib-smtp-email_1.0.1_1789571735871_0.9286488526170156"}}},"time":{"created":"2026-06-21T20:19:13.951Z","modified":"2026-09-16T15:15:36.132Z","0.1.0":"2026-06-21T20:19:14.188Z","1.0.0":"2026-09-15T20:12:57.360Z","1.0.1":"2026-09-16T15:15:35.954Z"},"bugs":{"url":"https://github.com/Harpau/node-red-contrib-smtp-email/issues"},"license":"MIT","homepage":"https://github.com/Harpau/node-red-contrib-smtp-email#readme","keywords":["node-red","smtp","email","mail"],"repository":{"url":"git+https://github.com/Harpau/node-red-contrib-smtp-email.git","type":"git"},"description":"SMTP email send node for Node-RED.","maintainers":[{"name":"harpau","email":"hpaulus@compeso.com"}],"readme":"# node-red-contrib-smtp-email\n\nSMTP email send nodes for Node-RED.\n\nThis package provides a Node-RED SMTP sender. It does not receive mail and it\ndoes not manage IMAP acknowledgements.\n\n## Package\n\n- npm package: `@compeso/node-red-contrib-smtp-email`\n- Node-RED types:\n  - `smtp-email account`\n  - `smtp-email send`\n- Palette labels:\n  - `smtp email account`\n  - `smtp email send`\n\n## Requirements\n\n- Node.js `>=22.0.0`\n- Node-RED `>=4.0.0`\n\n## Installation\n\nInstall the package into your Node-RED user directory:\n\n```bash\nnpm install @compeso/node-red-contrib-smtp-email\n```\n\nRestart Node-RED after installation so the new nodes appear in the palette.\n\n## Nodes\n\n### smtp email account\n\n`smtp email account` is a shared configuration node for SMTP connection\nsettings:\n\n- SMTP host, for example `smtp.example.invalid`\n- SMTP port\n- TLS from connection start\n- certificate validation\n- default sender address, for example `forwarder@example.invalid`\n- SMTP login values stored as Node-RED credentials\n\nLogin values are stored through Node-RED's credential mechanism. They are not\nmessage fields and should not be added to example flows or logs.\n\n### smtp email send\n\n`smtp email send` sends one email for each incoming message. It has one input\nand two outputs:\n\n- output 1: send succeeded\n- output 2: send failed\n\nThe node writes SMTP delivery metadata to `msg.smtpEmail`.\n\nOn success, `msg.smtpEmail` may contain:\n\n- `messageId`\n- `accepted`\n- `rejected`\n- `response`\n\nOn failure, `msg.smtpEmail.error` contains a sanitized error message.\n\n### Connection check on deploy\n\nEach send node checks its configured SMTP connection when it starts, including\non Node-RED startup, a full deploy, and a deploy that restarts the node after\nchanges to its settings or account credentials. A partial deploy checks only\nthe send nodes that restart. Send nodes using the same account share a check\nwhile it is in progress; later starts perform a new check.\n\nThe check verifies the connection, configured TLS settings and, when login\nvalues are configured, authentication. Authentication must succeed even if the\nserver does not advertise AUTH. Accounts without login values can use SMTP\nrelays that do not require authentication. The check does not send an email.\n\nNode status during the check:\n\n| Status | Display | Meaning |\n| --- | --- | --- |\n| `connecting` | yellow ring | connection check is in progress |\n| `connected` | green dot | connection and configured authentication succeeded |\n| `auth failed` | red ring | configured authentication failed or is unavailable |\n| `host not found` | red ring | SMTP hostname could not be resolved |\n| `connection failed` | red ring | connection was refused, interrupted or failed |\n| `TLS error` | red ring | TLS negotiation or certificate validation failed |\n| `timeout` | red ring | the connection check exceeded its time limit |\n| `missing account` | red ring | SMTP account configuration is missing |\n| `invalid account` | red ring | SMTP account configuration is incomplete or invalid |\n\n`connected` describes the last successful check. The test connection is closed\nafterwards; this is not a persistent connection or a guarantee of future\navailability, acceptance of a particular email or final delivery. The status\nwaits at most 15 seconds for the check. Separate network timeouts limit the\nunderlying connection work; cancellation does not guarantee that an in-flight\nconnection closes immediately.\n\nThe check is asynchronous, produces no output messages and does not change the\nsend counts. A failed check does not block later send attempts. Results from\nclosed or redeployed nodes are discarded. Once the node receives its first\nmessage, sending controls the status; a late check result cannot overwrite it.\n\nNode status after a message arrives:\n\n| Status | Meaning |\n| --- | --- |\n| `sending` | SMTP send is in progress |\n| `sent N` | last send succeeded; volatile sent count |\n| `failed N` | planning or sending failed; volatile failed count |\n| `sent N, failed M` | both counts are shown after mixed outcomes |\n\nThe sent and failed counts are kept in memory per node instance and reset on\ndeploy or restart. Status text does not include SMTP hosts, account values,\nrecipient addresses or SMTP error details.\n\n## Field Sources\n\nThe send node has no global compose or forward mode. Each outgoing email field\nhas its own source selector:\n\n- `msg`: read a value from a message path, for example `email.text`\n- `string`: use a fixed string from the node configuration\n\nThe path value is relative to `msg`, so `email.text` reads `msg.email.text`.\nEmpty optional fields are omitted. If `from` is empty, the account default\nsender is used.\n\nDefault field mapping:\n\n| Email field | Default source | Default value | Notes |\n| --- | --- | --- | --- |\n| `to` | `string` | empty | required before sending |\n| `cc` | `string` | empty | optional |\n| `bcc` | `string` | empty | optional |\n| `from` | `string` | empty | falls back to account sender |\n| `replyTo` | `msg` | `email.header.reply-to` | matches `imap email in` headers |\n| `subject` | `msg` | `email.topic` | matches `imap email in` subject |\n| `text` | `msg` | `email.text` | plain text body |\n| `html` | `msg` | `email.html` | HTML body |\n| `attachments` | `msg` | `email.attachments` | must resolve to an array |\n\nAt least one recipient and either text or HTML content are required. A non-empty\nfixed string is not accepted for attachments; use a message path for attachment\narrays.\n\nThe top-level fields `msg.to`, `msg.cc`, `msg.bcc`, `msg.from`,\n`msg.replyTo`, `msg.subject`, `msg.payload`, `msg.html` and\n`msg.attachments` are still usable by configuring the matching path explicitly.\nThey are not used automatically.\n\nFor messages from `imap email in`, the default mapping already reads subject,\nbody, HTML, reply-to and attachments from the documented `msg.email` structure.\nRecipient fields are intentionally empty by default so a flow does not send to\nthe original recipients by accident.\n\n## IMAP Forwarding\n\nThis package does not include IMAP receive, delete, move, flag or acknowledge\nfeatures. IMAP integration happens only through the Node-RED message object.\n\nRecommended flow:\n\n```text\nimap email in -> smtp email send -> imap email ack\n```\n\nConfigure the `To` field on `smtp email send`, for example as the fixed string\n`recipient@example.invalid`. Leave the default `msg.email` mappings for subject,\nbody, HTML, reply-to and attachments when forwarding messages from\n`imap email in`.\n\nThe example flow is available at:\n\n```text\nexamples/imap-forward-to-smtp.json\n```\n\nIn this flow, SMTP output 1 goes to `imap email ack`. SMTP output 2 goes to a\ndebug node. Do not wire the failure output to an IMAP acknowledgement node,\notherwise an original email could be acknowledged after a failed forward.\n\nPartial recipient acceptance is a successful send: output 1 can trigger the\nIMAP acknowledgement even when some recipients are rejected. The example's\nacknowledgement deletes the original email in this case. This is intentional;\nsee [Delivery Semantics](#delivery-semantics) for details.\n\n`msg.imap` belongs to the IMAP package. `smtp email send` keeps the original\nmessage object moving through the flow and does not remove or replace\n`msg.imap.ackToken`.\n\n## Delivery Semantics\n\nOn successful send:\n\n- the original `msg` is sent on output 1\n- `msg.imap` is preserved\n- `msg.imap.ackToken` is preserved\n- `msg.smtpEmail` contains SMTP result metadata\n\nSMTP acceptance is not a guarantee of final delivery. If the SMTP server accepts\nat least one recipient and Nodemailer reports a successful send, the node uses\noutput 1 and increments the sent count, even if other recipients were rejected.\nAccepted recipients are listed in `msg.smtpEmail.accepted`; rejected recipients\nare listed in `msg.smtpEmail.rejected`.\n\nFor example, a result with `accepted: [\"recipient@example.invalid\"]` and\n`rejected: [\"other@example.invalid\"]` still uses output 1. A downstream\n`imap email ack` can therefore delete, move or flag the original email despite\nthose rejected recipients. This behavior is intentional. Flows that require\nacceptance for every recipient can inspect `msg.smtpEmail.rejected` before\nacknowledging the original email.\n\nOn failed send:\n\n- the original `msg` is sent on output 2\n- output 1 is not triggered\n- `msg.smtpEmail.error` contains a sanitized error\n- the failure path should not be connected to an IMAP acknowledgement node\n\n## Examples\n\nThe `examples` directory contains importable Node-RED flows. Example values use\nreserved placeholder domains such as `smtp.example.invalid` and\n`recipient@example.invalid`.\n\nBefore using an example flow, replace placeholder accounts and addresses with\nvalues from your own environment inside Node-RED.\n\n## Limits\n\n- No IMAP receive node is included.\n- No IMAP acknowledge, delete, move or flag operation is included.\n- No direct dependency on `@compeso/node-red-contrib-imap-email`.\n- No OAuth2 support yet.\n- No real credentials, tokens or private endpoints are included in examples.\n\n## Development Checks\n\nBefore larger changes, run:\n\n```bash\nnpm install\nnpm test\nnpm audit\nnpm run pack:check\n```\n\n## License and Release Notes\n\nThis package is available under the [MIT License](LICENSE).\nSee [CHANGELOG.md](CHANGELOG.md) for release notes.\n","readmeFilename":"README.md"}