@5minds/node-red-contrib-processcube-tools 1.0.2-feature-8805f0-mfnm2ko3 → 1.0.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.
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
</div>
|
|
207
207
|
<div class="form-row">
|
|
208
208
|
<label for="node-input-password"><i class="fa fa-lock"></i> Password</label>
|
|
209
|
-
<input type="
|
|
209
|
+
<input type="password" id="node-input-password" />
|
|
210
210
|
<input type="hidden" id="node-input-passwordType" />
|
|
211
211
|
</div>
|
|
212
212
|
<div class="form-row">
|
|
@@ -223,85 +223,84 @@
|
|
|
223
223
|
|
|
224
224
|
<script type="text/html" data-help-name="email-sender">
|
|
225
225
|
<p>
|
|
226
|
-
A custom
|
|
226
|
+
A custom node to send emails using an SMTP server. The configuration for each field can be sourced from a fixed
|
|
227
|
+
value, or from a <code>msg</code>, <code>flow</code>, <code>global</code>, or <code>env</code> variable.
|
|
227
228
|
</p>
|
|
228
229
|
|
|
229
|
-
<h3>Description</h3>
|
|
230
|
-
<p>
|
|
231
|
-
The <b>email-sender</b> node is designed to send emails from your Node-RED flows. It supports a wide range of features, including sending HTML content, adding attachments, and using flexible configurations for all email and SMTP settings. All fields are <b>typed inputs</b>, meaning you can pull values from different sources like <code>msg</code> properties, <code>flow</code>/<code>global</code> context, or environment variables.
|
|
232
|
-
</p>
|
|
233
|
-
|
|
234
|
-
<h3>Inputs</h3>
|
|
235
|
-
<p>
|
|
236
|
-
This node accepts a message (<code>msg</code>) as input. The node is triggered when it receives a message. The properties of the incoming message can be used to set the email's configuration fields.
|
|
237
|
-
</p>
|
|
238
|
-
|
|
239
|
-
<h3>Outputs</h3>
|
|
240
|
-
<p>
|
|
241
|
-
This node sends one message upon successful execution.
|
|
242
|
-
</p>
|
|
243
|
-
<dl class="message-properties">
|
|
244
|
-
<dt>payload <span class="property-type">any</span></dt>
|
|
245
|
-
<dd>The <code>payload</code> of the original message is passed through to the next node.</dd>
|
|
246
|
-
<dt>topic <span class="property-type">string</span></dt>
|
|
247
|
-
<dd>The <code>topic</code> of the original message is passed through to the next node.</dd>
|
|
248
|
-
</dl>
|
|
249
|
-
<p>The node's status will be updated to show whether the email was sent successfully.</p>
|
|
250
|
-
|
|
251
230
|
<h3>Configuration</h3>
|
|
252
231
|
<p>
|
|
253
|
-
|
|
232
|
+
Every field on the configuration panel is a <b>typed input</b>. Use the dropdown menu next to each field to
|
|
233
|
+
select the source of its value. Note that <b>Sender</b>, <b>Address</b>, <b>To</b>, <b>Subject</b>, and
|
|
234
|
+
<b>HTML Content</b> are required fields and must be configured before the node can be deployed.
|
|
254
235
|
</p>
|
|
255
236
|
|
|
256
237
|
<h4>Mail Configuration</h4>
|
|
257
238
|
<dl class="message-properties">
|
|
258
|
-
<dt>Name <i>(Optional)</i> <span class="property-type">string</span></dt>
|
|
259
|
-
<dd>A descriptive name for the node.</dd>
|
|
260
239
|
<dt>Sender <span class="property-type">string | variable</span></dt>
|
|
261
|
-
<dd>The name
|
|
240
|
+
<dd>The name of the sender, as displayed to the recipient.</dd>
|
|
241
|
+
|
|
262
242
|
<dt>Address <span class="property-type">string | variable</span></dt>
|
|
263
|
-
<dd>The email address
|
|
243
|
+
<dd>The sender's email address.</dd>
|
|
244
|
+
|
|
264
245
|
<dt>To <span class="property-type">string | variable</span></dt>
|
|
265
|
-
<dd>The primary recipient
|
|
266
|
-
|
|
267
|
-
<
|
|
268
|
-
<
|
|
269
|
-
|
|
270
|
-
<dt>
|
|
271
|
-
<dd>
|
|
246
|
+
<dd>The primary recipient's email address. Separate multiple addresses with a comma.</dd>
|
|
247
|
+
|
|
248
|
+
<dt>CC <span class="property-type">string | variable</span></dt>
|
|
249
|
+
<dd>Addresses to be carbon-copied on the email.</dd>
|
|
250
|
+
|
|
251
|
+
<dt>BCC <span class="property-type">string | variable</span></dt>
|
|
252
|
+
<dd>Addresses to be blind-carbon-copied on the email.</dd>
|
|
253
|
+
|
|
254
|
+
<dt>Reply To <span class="property-type">string | variable</span></dt>
|
|
255
|
+
<dd>Address that is being set as the that will be set, if the user presses the reply button.
|
|
256
|
+
Can be different than the email, that has sent the email.</dd>
|
|
257
|
+
|
|
272
258
|
<dt>Subject <span class="property-type">string | variable</span></dt>
|
|
273
259
|
<dd>The subject line of the email.</dd>
|
|
260
|
+
|
|
274
261
|
<dt>HTML Content <span class="property-type">string | variable</span></dt>
|
|
275
|
-
<dd>The
|
|
276
|
-
|
|
277
|
-
<
|
|
262
|
+
<dd>The HTML body of the email.</dd>
|
|
263
|
+
|
|
264
|
+
<dt>Attachments <span class="property-type">array | variable</span></dt>
|
|
265
|
+
<dd>A list of file attachments. This should be a variable containing an array of attachment objects.</dd>
|
|
278
266
|
</dl>
|
|
279
267
|
|
|
280
268
|
<h4>SMTP Configuration</h4>
|
|
281
269
|
<dl class="message-properties">
|
|
282
270
|
<dt>Host <span class="property-type">string | variable</span></dt>
|
|
283
|
-
<dd>The hostname of
|
|
271
|
+
<dd>The hostname or IP address of the SMTP server.</dd>
|
|
272
|
+
|
|
284
273
|
<dt>Port <span class="property-type">number | variable</span></dt>
|
|
285
|
-
<dd>The port number
|
|
274
|
+
<dd>The port number of the SMTP server.</dd>
|
|
275
|
+
|
|
286
276
|
<dt>User <span class="property-type">string | variable</span></dt>
|
|
287
277
|
<dd>The username for SMTP authentication.</dd>
|
|
288
|
-
|
|
289
|
-
<
|
|
278
|
+
|
|
279
|
+
<dt>Password <span class="property-type">string | variable</span></dt>
|
|
280
|
+
<dd>The password for SMTP authentication.</dd>
|
|
281
|
+
|
|
290
282
|
<dt>SSL/TLS (Secure) <span class="property-type">boolean | variable</span></dt>
|
|
291
|
-
<dd>
|
|
283
|
+
<dd>
|
|
284
|
+
Use a secure connection. Set to <code>true</code> for SSL/TLS, <code>false</code> for a non-secure
|
|
285
|
+
connection.
|
|
286
|
+
</dd>
|
|
287
|
+
|
|
292
288
|
<dt>Reject Unauthorized <span class="property-type">boolean | variable</span></dt>
|
|
293
|
-
<dd>If <code>true</code>, the server's certificate is rejected if it
|
|
289
|
+
<dd>If <code>true</code>, the server's certificate is rejected if it's not authorized by a trusted CA.</dd>
|
|
294
290
|
</dl>
|
|
295
291
|
|
|
296
|
-
<h3>Usage
|
|
297
|
-
<
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
292
|
+
<h3>Usage</h3>
|
|
293
|
+
<p>
|
|
294
|
+
Inject a message to trigger the node and send an email.<br />
|
|
295
|
+
Credentials and other properties can be provided via message properties, flow/global context, or environment
|
|
296
|
+
variables.<br />
|
|
297
|
+
The node supports sending HTML emails and attachments.
|
|
298
|
+
</p>
|
|
302
299
|
|
|
303
|
-
<h3>
|
|
304
|
-
<p>
|
|
305
|
-
|
|
306
|
-
|
|
300
|
+
<h3>Tips</h3>
|
|
301
|
+
<p>
|
|
302
|
+
<b>HTML Content Creation:</b><br />
|
|
303
|
+
To generate or format HTML content for your email, you can use a <b>template node</b> before the email-sender
|
|
304
|
+
node. This allows you to create dynamic and customized email bodies.
|
|
305
|
+
</p>
|
|
307
306
|
</script>
|
|
@@ -157,6 +157,8 @@ module.exports = function (RED) {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
RED.nodes.registerType('email-sender', EmailSenderNode);
|
|
161
|
+
|
|
160
162
|
function safeEvaluatePropertyAttachment(config, node, msg) {
|
|
161
163
|
if (config.attachments && config.attachments.trim() !== '') {
|
|
162
164
|
try {
|
|
@@ -169,10 +171,4 @@ module.exports = function (RED) {
|
|
|
169
171
|
|
|
170
172
|
return null;
|
|
171
173
|
}
|
|
172
|
-
|
|
173
|
-
RED.nodes.registerType('email-sender', EmailSenderNode, {
|
|
174
|
-
credentials: {
|
|
175
|
-
password: { type: 'password' },
|
|
176
|
-
},
|
|
177
|
-
});
|
|
178
174
|
};
|