Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
EMAIL_SEND_PORT=
EMAIL_SEND_HOST=
EMAIL_SEND_USER=
EMAIL_SEND_PASSWORD=
EMAIL_SEND_PORT=3025
EMAIL_SEND_HOST=greenmail
EMAIL_SEND_USER=user2@localhost
EMAIL_SEND_PASSWORD=user2@localhost

EMAIL_RECEIVE_PORT=3143
EMAIL_RECEIVE_HOST=greenmail
EMAIL_RECEIVE_USER=user1@localhost
EMAIL_RECEIVE_PASSWORD=user1@localhost
# depending on IMAP server folder separators may be different, e.g. INBOX.folder1 or INBOX/folder1
# greenmails uses . gmail /
EMAIL_RECEIVE_FOLDER=["INBOX.folder1"]

EMAIL_RECEIVE_PORT=
EMAIL_RECEIVE_HOST=
EMAIL_RECEIVE_USER=
EMAIL_RECEIVE_PASSWORD=
#EMAIL_RECEIVE_FOLDER=test_foo, test_bar
EMAIL_RECEIVE_FOLDER='["test_foo", "test_bar"]'
205 changes: 186 additions & 19 deletions .processcube/nodered/flows.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
{
"id": "80507426de7d4fe9",
"type": "imap-config",
"name": "Mail Receiver Config for Stölting",
"name": "Mail Receiver Config",
"host": "EMAIL_RECEIVE_HOST",
"hostType": "env",
"port": "EMAIL_RECEIVE_PORT",
"portType": "env",
"tls": true,
"tls": false,
"user": "EMAIL_RECEIVE_USER",
"userType": "env",
"password": "EMAIL_RECEIVE_PASSWORD",
Expand All @@ -40,15 +40,17 @@
"authTimeout": 5000,
"keepalive": true,
"autotls": "never",
"rejectUnauthorized": false
"rejectUnauthorized": false,
"poolEnabled": false,
"poolTimeout": "60000"
},
{
"id": "be3042551fefd2a7",
"type": "smtp-config",
"name": "SMTP Send Config",
"host": "EMAIL_SEND_HOST",
"hostType": "env",
"port": "EMAIL_SEND_PORT=993",
"port": "EMAIL_SEND_PORT",
"portType": "env",
"user": "EMAIL_SEND_USER",
"userType": "env",
Expand All @@ -58,7 +60,11 @@
"authTimeout": "",
"keepalive": false,
"secure": false,
"rejectUnauthorized": false
"autotls": "never",
"rejectUnauthorized": false,
"poolEnabled": true,
"poolSize": "5",
"poolTimeout": "60000"
},
{
"id": "fd4bdf33d0253f6a",
Expand Down Expand Up @@ -158,8 +164,8 @@
"z": "ea83acb4b5051be5",
"name": "Email receiver via env",
"imapConfig": "80507426de7d4fe9",
"folder": "[\"stoelting/test_foo\",\"stoelting/test_bar\"]",
"folderType": "json",
"folder": "EMAIL_RECEIVE_FOLDER",
"folderType": "env",
"markseen": "imap_markseen",
"markseenType": "msg",
"x": 520,
Expand Down Expand Up @@ -198,7 +204,7 @@
"props": [
{
"p": "imap_markseen",
"v": "true",
"v": "false",
"vt": "bool"
}
],
Expand Down Expand Up @@ -260,8 +266,8 @@
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 910,
Expand All @@ -283,8 +289,8 @@
"y": 120,
"wires": [
[
"9f7dfdb7f34fa92b",
"4606c8597de44ada"
"4606c8597de44ada",
"9f7dfdb7f34fa92b"
]
]
},
Expand Down Expand Up @@ -312,9 +318,9 @@
"name": "",
"sender": "Diana",
"senderType": "str",
"from": "EMAIL_SEND_USER",
"fromType": "env",
"to": "martin.moellenbeck@googlemail.com",
"from": "user2",
"fromType": "str",
"to": "user1@localhost",
"toType": "str",
"cc": "",
"ccType": "str",
Expand Down Expand Up @@ -558,11 +564,11 @@
"type": "email-sender",
"z": "efcace170d0f887c",
"name": "",
"sender": "Diana",
"sender": "Processcube",
"senderType": "str",
"from": "EMAIL_SEND_USER",
"fromType": "env",
"to": "martin.moellenbeck@googlemail.com",
"from": "user2",
"fromType": "str",
"to": "user1@localhost",
"toType": "str",
"cc": "",
"ccType": "str",
Expand All @@ -584,5 +590,166 @@
"c246681d350609e4"
]
]
},
{
"id": "1ebe7d802151c733",
"type": "inject",
"z": "efcace170d0f887c",
"name": "Mass send test of the email-sender node",
"props": [],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 240,
"y": 440,
"wires": [
[
"bd5716f5aab6b375"
]
]
},
{
"id": "a5f8c07f51d015a0",
"type": "debug",
"z": "efcace170d0f887c",
"name": "Test email sent",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1060,
"y": 380,
"wires": []
},
{
"id": "8705fdd5b13ff4a6",
"type": "email-sender",
"z": "efcace170d0f887c",
"name": "",
"sender": "Mass Sender",
"senderType": "str",
"from": "user2",
"fromType": "str",
"to": "user1@localhost",
"toType": "str",
"cc": "",
"ccType": "str",
"bcc": "",
"bccType": "str",
"replyTo": "",
"replyToType": "str",
"subject": "subject",
"subjectType": "msg",
"htmlContent": "test",
"htmlContentType": "str",
"attachments": "",
"attachmentsType": "msg",
"smtpConfig": "be3042551fefd2a7",
"x": 820,
"y": 440,
"wires": [
[
"a5f8c07f51d015a0",
"8b050c8e5b685db1"
]
]
},
{
"id": "bd5716f5aab6b375",
"type": "function",
"z": "efcace170d0f887c",
"name": "Initialize mass mail",
"func": "msg.max = 5000;\nmsg.subject = `Massentest ${(msg.count || 0) + 1}`;\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 440,
"wires": [
[
"8705fdd5b13ff4a6"
]
]
},
{
"id": "8b050c8e5b685db1",
"type": "function",
"z": "efcace170d0f887c",
"name": "Next mail",
"func": "if (!msg.count){\n msg.count = 0;\n}\n\nmsg.count = msg.count + 1;\n\nif (msg.count < msg.max){\n return [null, msg];\n}\nelse{\n return [msg, null];\n}",
"outputs": 2,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1040,
"y": 440,
"wires": [
[
"9239cc3c7b82daea"
],
[
"bd5716f5aab6b375"
]
]
},
{
"id": "9239cc3c7b82daea",
"type": "debug",
"z": "efcace170d0f887c",
"name": "Mass emails sent",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1270,
"y": 440,
"wires": []
},
{
"id": "73f822f0be4f8fb0",
"type": "catch",
"z": "efcace170d0f887c",
"name": "",
"scope": null,
"uncaught": false,
"x": 160,
"y": 580,
"wires": [
[
"fbcc94109c77dd3d"
]
]
},
{
"id": "fbcc94109c77dd3d",
"type": "debug",
"z": "efcace170d0f887c",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 320,
"y": 580,
"wires": []
}
]
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,20 @@ services:
volumes:
# save the flows
- ./.processcube/nodered:/data
greenmail:
image: greenmail/standalone:latest
ports:
- "3025:3025" # SMTP
- "3143:3143" # IMAP
volumes:
- ./src/test/data/email-preload:/email-preload
environment:
- GREENMAIL_OPTS=-Dgreenmail.hostname=0.0.0.0 -Dgreenmail.setup.test.all -Dgreenmail.preload.dir=/email-preload
#-Dgreenmail.users=test1:secret@local
healthcheck:
test: ["CMD", "sh", "-c", "nc -z localhost 3025 && nc -z localhost 3143"]
interval: 3s
timeout: 2s
retries: 20


4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@5minds/node-red-contrib-processcube-tools",
"version": "1.2.3",
"version": "1.3.0",
"license": "MIT",
"description": "Node-RED tools nodes for ProcessCube",
"scripts": {
Expand Down
Loading