@5minds/node-red-contrib-processcube-tools 1.0.1-feature-4ad612-mfdvfdql → 1.0.1-feature-3af406-mfdy163c
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/email-sender/email-sender.html +112 -24
- package/package.json +4 -2
|
@@ -1,50 +1,138 @@
|
|
|
1
1
|
<script type="text/javascript">
|
|
2
2
|
RED.nodes.registerType('email-sender',{
|
|
3
|
-
category: '
|
|
4
|
-
color: '#
|
|
3
|
+
category: 'ProcessCube Tools',
|
|
4
|
+
color: '#02AFD6',
|
|
5
5
|
defaults: {
|
|
6
|
-
name: {value: ""},
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
name: { value: "" },
|
|
7
|
+
// Definition der Felder mit dem Typ 'typedInput'
|
|
8
|
+
fromName: { value: "Stoelting Ticket-System", type: "typedInput", types: ["str", "msg", "flow", "global", "env"] },
|
|
9
|
+
fromAddress: { value: "", type: "typedInput", types: ["str", "msg", "flow", "global", "env"] },
|
|
10
|
+
to: { value: "", type: "typedInput", types: ["str", "msg", "flow", "global", "env"] },
|
|
11
|
+
cc: { value: "", type: "typedInput", types: ["str", "msg", "flow", "global", "env"] },
|
|
12
|
+
bcc: { value: "", type: "typedInput", types: ["str", "msg", "flow", "global", "env"] },
|
|
13
|
+
subject: { value: "", type: "typedInput", types: ["str", "msg", "flow", "global", "env"] },
|
|
14
|
+
attachments: { value: "", type: "typedInput", types: ["msg", "flow", "global"] },
|
|
15
|
+
htmlContent: { value: "", type: "typedInput", types: ["str", "msg", "flow", "global", "json"] },
|
|
16
|
+
|
|
17
|
+
// SMTP-Felder
|
|
18
|
+
smtpHost: { value: "", type: "typedInput", types: ["str", "msg", "flow", "global", "env"] },
|
|
19
|
+
smtpPort: { value: "", type: "typedInput", types: ["num", "str", "msg", "flow", "global", "env"] },
|
|
20
|
+
smtpUser: { value: "", type: "typedInput", types: ["str", "msg", "flow", "global", "env"] },
|
|
21
|
+
smtpPassword: { value: "", type: "typedInput", types: ["str", "msg", "flow", "global", "env"] },
|
|
22
|
+
smtpSecure: { value: true, type: "typedInput", types: ["bool", "msg", "flow", "global"] },
|
|
23
|
+
smtpRejectUnauthorized: { value: true, type: "typedInput", types: ["bool", "msg", "flow", "global"] }
|
|
9
24
|
},
|
|
10
25
|
inputs:1,
|
|
11
26
|
outputs:1,
|
|
12
|
-
icon: "font-awesome/fa-
|
|
27
|
+
icon: "font-awesome/fa-paper-plane",
|
|
13
28
|
label: function() {
|
|
14
|
-
return this.name || "
|
|
29
|
+
return this.name || "Email Sender";
|
|
15
30
|
},
|
|
16
31
|
labelStyle: function() {
|
|
17
32
|
return this.name?"node_label_italic":"";
|
|
18
33
|
}
|
|
19
34
|
});
|
|
20
35
|
</script>
|
|
21
|
-
|
|
22
36
|
<script type="text/html" data-template-name="custom-email-sender">
|
|
23
37
|
<div class="form-row">
|
|
24
38
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
25
39
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
26
40
|
</div>
|
|
41
|
+
|
|
42
|
+
<h3>E-Mail Konfiguration</h3>
|
|
43
|
+
<div class="form-row">
|
|
44
|
+
<label for="node-input-fromName"><i class="fa fa-user"></i> Absendername</label>
|
|
45
|
+
<input type="text" id="node-input-fromName">
|
|
46
|
+
</div>
|
|
47
|
+
<div class="form-row">
|
|
48
|
+
<label for="node-input-fromAddress"><i class="fa fa-envelope"></i> Absenderadresse</label>
|
|
49
|
+
<input type="text" id="node-input-fromAddress">
|
|
50
|
+
</div>
|
|
51
|
+
<div class="form-row">
|
|
52
|
+
<label for="node-input-to"><i class="fa fa-user-plus"></i> Empfänger (To)</label>
|
|
53
|
+
<input type="text" id="node-input-to">
|
|
54
|
+
</div>
|
|
55
|
+
<div class="form-row">
|
|
56
|
+
<label for="node-input-cc"><i class="fa fa-user"></i> CC</label>
|
|
57
|
+
<input type="text" id="node-input-cc">
|
|
58
|
+
</div>
|
|
59
|
+
<div class="form-row">
|
|
60
|
+
<label for="node-input-bcc"><i class="fa fa-user-secret"></i> BCC</label>
|
|
61
|
+
<input type="text" id="node-input-bcc">
|
|
62
|
+
</div>
|
|
63
|
+
<div class="form-row">
|
|
64
|
+
<label for="node-input-subject"><i class="fa fa-info-circle"></i> Betreff</label>
|
|
65
|
+
<input type="text" id="node-input-subject">
|
|
66
|
+
</div>
|
|
67
|
+
<div class="form-row">
|
|
68
|
+
<label for="node-input-attachments"><i class="fa fa-paperclip"></i> Anhänge</label>
|
|
69
|
+
<input type="text" id="node-input-attachments">
|
|
70
|
+
</div>
|
|
27
71
|
<div class="form-row">
|
|
28
|
-
<label for="node-input-
|
|
29
|
-
<input type="text" id="node-input-
|
|
30
|
-
|
|
72
|
+
<label for="node-input-htmlContent"><i class="fa fa-file-code-o"></i> HTML Inhalt</label>
|
|
73
|
+
<input type="text" id="node-input-htmlContent">
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<h3>SMTP Konfiguration</h3>
|
|
77
|
+
<div class="form-row">
|
|
78
|
+
<label for="node-input-smtpHost"><i class="fa fa-server"></i> Host</label>
|
|
79
|
+
<input type="text" id="node-input-smtpHost">
|
|
80
|
+
</div>
|
|
81
|
+
<div class="form-row">
|
|
82
|
+
<label for="node-input-smtpPort"><i class="fa fa-plug"></i> Port</label>
|
|
83
|
+
<input type="text" id="node-input-smtpPort">
|
|
84
|
+
</div>
|
|
85
|
+
<div class="form-row">
|
|
86
|
+
<label for="node-input-smtpUser"><i class="fa fa-user"></i> Benutzer</label>
|
|
87
|
+
<input type="text" id="node-input-smtpUser">
|
|
88
|
+
</div>
|
|
89
|
+
<div class="form-row">
|
|
90
|
+
<label for="node-input-smtpPassword"><i class="fa fa-lock"></i> Passwort</label>
|
|
91
|
+
<input type="password" id="node-input-smtpPassword">
|
|
31
92
|
</div>
|
|
32
93
|
<div class="form-row">
|
|
33
|
-
<label for="node-input-
|
|
34
|
-
<input type="
|
|
35
|
-
|
|
94
|
+
<label for="node-input-smtpSecure"><i class="fa fa-shield"></i> SSL/TLS (Secure)</label>
|
|
95
|
+
<input type="checkbox" id="node-input-smtpSecure">
|
|
96
|
+
</div>
|
|
97
|
+
<div class="form-row">
|
|
98
|
+
<label for="node-input-smtpRejectUnauthorized"><i class="fa fa-ban"></i> Zertifikate ablehnen</label>
|
|
99
|
+
<input type="checkbox" id="node-input-smtpRejectUnauthorized">
|
|
36
100
|
</div>
|
|
37
101
|
</script>
|
|
38
102
|
|
|
39
103
|
<script type="text/html" data-help-name="custom-email-sender">
|
|
40
|
-
<p>Eine benutzerdefinierte Node, um E-Mails über einen SMTP-Server zu versenden.</p>
|
|
41
|
-
<h3>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
104
|
+
<p>Eine benutzerdefinierte Node, um E-Mails über einen SMTP-Server zu versenden. Die Konfiguration kann über die Node-Eigenschaften, die eingehende Nachricht, Flow- oder Global-Kontexte oder Umgebungsvariablen erfolgen.</p>
|
|
105
|
+
<h3>Konfiguration der Felder</h3>
|
|
106
|
+
<p>Jedes Feld kann so konfiguriert werden, dass es einen festen Wert (string, number, boolean) oder einen Wert aus <code>msg</code>, <code>flow</code>, <code>global</code> oder <code>env</code> bezieht. Verwenden Sie das Dropdown-Menü neben dem Eingabefeld, um den Typ auszuwählen.</p>
|
|
107
|
+
</script>
|
|
108
|
+
|
|
109
|
+
<script type="text/javascript">
|
|
110
|
+
(function() {
|
|
111
|
+
// Initialisierung des typedInput-Widgets für die einzelnen Felder
|
|
112
|
+
function initializeTypedInput(id, types) {
|
|
113
|
+
$("#node-input-" + id).typedInput({
|
|
114
|
+
default: types[0],
|
|
115
|
+
types: types
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Initialisierung aller Felder
|
|
120
|
+
RED.events.on('nodes:load', function() {
|
|
121
|
+
initializeTypedInput('fromName', ["str", "msg", "flow", "global", "env"]);
|
|
122
|
+
initializeTypedInput('fromAddress', ["str", "msg", "flow", "global", "env"]);
|
|
123
|
+
initializeTypedInput('to', ["str", "msg", "flow", "global", "env"]);
|
|
124
|
+
initializeTypedInput('cc', ["str", "msg", "flow", "global", "env"]);
|
|
125
|
+
initializeTypedInput('bcc', ["str", "msg", "global", "env"]);
|
|
126
|
+
initializeTypedInput('subject', ["str", "msg", "flow", "global", "env"]);
|
|
127
|
+
initializeTypedInput('attachments', ["msg", "flow", "global"]);
|
|
128
|
+
initializeTypedInput('htmlContent', ["str", "msg", "flow", "global"]);
|
|
129
|
+
|
|
130
|
+
initializeTypedInput('smtpHost', ["str", "msg", "flow", "global", "env"]);
|
|
131
|
+
initializeTypedInput('smtpPort', ["num", "str", "msg", "flow", "global", "env"]);
|
|
132
|
+
initializeTypedInput('smtpUser', ["str", "msg", "flow", "global", "env"]);
|
|
133
|
+
initializeTypedInput('smtpPassword', ["str", "msg", "flow", "global", "env"]);
|
|
134
|
+
initializeTypedInput('smtpSecure', ["bool", "msg", "flow", "global"]);
|
|
135
|
+
initializeTypedInput('smtpRejectUnauthorized', ["bool", "msg", "flow", "global"]);
|
|
136
|
+
});
|
|
137
|
+
})();
|
|
50
138
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@5minds/node-red-contrib-processcube-tools",
|
|
3
|
-
"version": "1.0.1-feature-
|
|
3
|
+
"version": "1.0.1-feature-3af406-mfdy163c",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node-RED tools nodes for ProcessCube",
|
|
6
6
|
"scripts": {
|
|
@@ -31,12 +31,14 @@
|
|
|
31
31
|
"node-red": {
|
|
32
32
|
"version": ">=3.1.9",
|
|
33
33
|
"nodes": {
|
|
34
|
+
"EmailSender": "email-sender/email-sender.js",
|
|
34
35
|
"HtmlToText": "processcube-html-to-text/processcube-html-to-text.js"
|
|
35
36
|
},
|
|
36
37
|
"examples": "examples"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"html-to-text": "^9.0.5"
|
|
40
|
+
"html-to-text": "^9.0.5",
|
|
41
|
+
"nodemailer": "^7.0.6"
|
|
40
42
|
},
|
|
41
43
|
"keywords": [
|
|
42
44
|
"node-red",
|