@5minds/node-red-contrib-processcube-tools 1.0.2-feature-8805f0-mfnm2ko3 → 1.0.2-feature-6cf243-mfp26zop

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.
@@ -222,24 +222,24 @@
222
222
  </script>
223
223
 
224
224
  <script type="text/html" data-help-name="email-sender">
225
- <p>
226
- A custom Node-RED node that simplifies sending emails using an SMTP server.
227
- </p>
225
+ <p>A custom Node-RED node that simplifies sending emails using an SMTP server.</p>
228
226
 
229
227
  <h3>Description</h3>
230
228
  <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.
229
+ The <b>email-sender</b> node is designed to send emails from your Node-RED flows. It supports a wide range of
230
+ features, including sending HTML content, adding attachments, and using flexible configurations for all email
231
+ and SMTP settings. All fields are <b>typed inputs</b>, meaning you can pull values from different sources like
232
+ <code>msg</code> properties, <code>flow</code>/<code>global</code> context, or environment variables.
232
233
  </p>
233
234
 
234
235
  <h3>Inputs</h3>
235
236
  <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
+ This node accepts a message (<code>msg</code>) as input. The node is triggered when it receives a message. The
238
+ properties of the incoming message can be used to set the email's configuration fields.
237
239
  </p>
238
240
 
239
241
  <h3>Outputs</h3>
240
- <p>
241
- This node sends one message upon successful execution.
242
- </p>
242
+ <p>This node sends one message upon successful execution.</p>
243
243
  <dl class="message-properties">
244
244
  <dt>payload <span class="property-type">any</span></dt>
245
245
  <dd>The <code>payload</code> of the original message is passed through to the next node.</dd>
@@ -250,7 +250,8 @@
250
250
 
251
251
  <h3>Configuration</h3>
252
252
  <p>
253
- All configuration fields are <b>typed inputs</b>, allowing you to set a <b>static value</b> or pull data dynamically from a <b>message</b>, <b>flow</b>, <b>global</b> context, or <b>environment variable</b>.
253
+ All configuration fields are <b>typed inputs</b>, allowing you to set a <b>static value</b> or pull data
254
+ dynamically from a <b>message</b>, <b>flow</b>, <b>global</b> context, or <b>environment variable</b>.
254
255
  </p>
255
256
 
256
257
  <h4>Mail Configuration</h4>
@@ -274,7 +275,10 @@
274
275
  <dt>HTML Content <span class="property-type">string | variable</span></dt>
275
276
  <dd>The full HTML body of the email.</dd>
276
277
  <dt>Attachments <i>(Optional)</i> <span class="property-type">array | variable</span></dt>
277
- <dd>A list of file attachments. This field should be an array of attachment objects. Each object must contain <code>filename</code>, <code>content</code> (the file's data), and optionally <code>contentType</code>.</dd>
278
+ <dd>
279
+ A list of file attachments. This field should be an array of attachment objects. Each object must contain
280
+ <code>filename</code>, <code>content</code> (the file's data), and optionally <code>contentType</code>.
281
+ </dd>
278
282
  </dl>
279
283
 
280
284
  <h4>SMTP Configuration</h4>
@@ -286,22 +290,43 @@
286
290
  <dt>User <span class="property-type">string | variable</span></dt>
287
291
  <dd>The username for SMTP authentication.</dd>
288
292
  <dt>Password <span class="property-type">password | variable</span></dt>
289
- <dd>The password for SMTP authentication. This is a secure field and its value will not be shown after deployment.</dd>
293
+ <dd>
294
+ The password for SMTP authentication. This is a secure field and its value will not be shown after
295
+ deployment.
296
+ </dd>
290
297
  <dt>SSL/TLS (Secure) <span class="property-type">boolean | variable</span></dt>
291
298
  <dd>Enables a secure connection. Set this to <code>true</code> to use SSL/TLS encryption.</dd>
292
299
  <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 isn't authorized by a trusted Certificate Authority (CA). Set this to <code>false</code> only if you know the server's certificate is self-signed or not from a trusted CA.</dd>
300
+ <dd>
301
+ If <code>true</code>, the server's certificate is rejected if it isn't authorized by a trusted Certificate
302
+ Authority (CA). Set this to <code>false</code> only if you know the server's certificate is self-signed or
303
+ not from a trusted CA.
304
+ </dd>
294
305
  </dl>
295
306
 
296
307
  <h3>Usage Notes</h3>
297
308
  <ul>
298
- <li><b>Dynamic Content</b>: You can use a <b>Template node</b> before the <b>email-sender</b> node to generate dynamic HTML content for your emails, using <code>msg</code> properties to fill in placeholders.</li>
299
- <li><b>Testing</b>: When testing, use a free service like <a href="https://mailtrap.io" target="_blank">Mailtrap</a> to avoid sending real emails. This allows you to inspect the email and its content without cluttering your inbox.</li>
300
- <li><b>Troubleshooting</b>: If you encounter a <code>Missing required IMAP config</code> error, double-check that all required fields are correctly configured and have values.</li>
309
+ <li>
310
+ <b>Dynamic Content</b>: You can use a <b>Template node</b> before the <b>email-sender</b> node to generate
311
+ dynamic HTML content for your emails, using <code>msg</code> properties to fill in placeholders.
312
+ </li>
313
+ <li>
314
+ <b>Testing</b>: When testing, use a free service like
315
+ <a href="https://mailtrap.io" target="_blank">Mailtrap</a> to avoid sending real emails. This allows you to
316
+ inspect the email and its content without cluttering your inbox.
317
+ </li>
318
+ <li>
319
+ <b>Troubleshooting</b>: If you encounter a <code>Missing required IMAP config</code> error, double-check
320
+ that all required fields are correctly configured and have values.
321
+ </li>
301
322
  </ul>
302
323
 
303
324
  <h3>Example</h3>
304
325
  <p>A basic flow could look like this:</p>
305
326
  <code>Inject Node</code> ➡️ <code>Change Node</code> ➡️ <code>email-sender Node</code>
306
- <p>In the <b>Change Node</b>, you can set <code>msg.payload</code> to your email's content and <code>msg.topic</code> to the subject. The <b>email-sender</b> node can then be configured to use these message properties as its input.</p>
327
+ <p>
328
+ In the <b>Change Node</b>, you can set <code>msg.payload</code> to your email's content and
329
+ <code>msg.topic</code> to the subject. The <b>email-sender</b> node can then be configured to use these message
330
+ properties as its input.
331
+ </p>
307
332
  </script>
@@ -48,7 +48,7 @@ module.exports = function (RED) {
48
48
  // Handle attachments and format them for Nodemailer
49
49
  let processedAttachments = [];
50
50
 
51
- let parsedAttachments = config.attachments;
51
+ let parsedAttachments = attachments;
52
52
 
53
53
  if (config.attachmentsType === 'json' && typeof parsedAttachments === 'string') {
54
54
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube-tools",
3
- "version": "1.0.2-feature-8805f0-mfnm2ko3",
3
+ "version": "1.0.2-feature-6cf243-mfp26zop",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED tools nodes for ProcessCube",
6
6
  "scripts": {