@5minds/node-red-contrib-processcube-tools 1.0.1-feature-00f482-mfm5528x → 1.0.1-feature-4840fd-mfm6a3hr
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 +16 -0
- package/email-sender/email-sender.js +2 -0
- package/package.json +1 -1
- package/test/integration/email-receiver.integration.test.js +1 -1
- package/test/integration/email-sender.integration.test.js +1 -4
- package/test/unit/email-receiver.unit.test.js +1 -1
- package/test/unit/email-sender.unit.test.js +1 -1
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
ccType: { value: 'str' },
|
|
20
20
|
bcc: { value: '', validate: RED.validators.typedInput('bccType') },
|
|
21
21
|
bccType: { value: 'str' },
|
|
22
|
+
replyTo: { value: '', validate: RED.validators.typedInput('replyToType') },
|
|
23
|
+
replyToType: { value: 'str' },
|
|
22
24
|
subject: { value: '', required: true, validate: RED.validators.typedInput('subjectType') },
|
|
23
25
|
subjectType: { value: 'str' },
|
|
24
26
|
htmlContent: { value: '', required: true, validate: RED.validators.typedInput('htmlContentType') },
|
|
@@ -77,6 +79,11 @@
|
|
|
77
79
|
types: ['str', 'msg', 'flow', 'global', 'env'],
|
|
78
80
|
typeField: '#node-input-bccType',
|
|
79
81
|
});
|
|
82
|
+
$('#node-input-replyTo').typedInput({
|
|
83
|
+
default: 'str',
|
|
84
|
+
types: ['str', 'msg', 'flow', 'global', 'env'],
|
|
85
|
+
typeField: '#node-input-replyToType',
|
|
86
|
+
});
|
|
80
87
|
$('#node-input-subject').typedInput({
|
|
81
88
|
default: 'str',
|
|
82
89
|
types: ['str', 'msg', 'flow', 'global', 'env'],
|
|
@@ -160,6 +167,11 @@
|
|
|
160
167
|
<input type="text" id="node-input-bcc" />
|
|
161
168
|
<input type="hidden" id="node-input-bccType" />
|
|
162
169
|
</div>
|
|
170
|
+
<div class="form-row">
|
|
171
|
+
<label for="node-input-replyTo"><i class="fa fa-mail-reply"></i> Reply To</label>
|
|
172
|
+
<input type="text" id="node-input-replyTo" />
|
|
173
|
+
<input type="hidden" id="node-input-replyToType" />
|
|
174
|
+
</div>
|
|
163
175
|
<div class="form-row">
|
|
164
176
|
<label for="node-input-subject"><i class="fa fa-info-circle"></i> Subject</label>
|
|
165
177
|
<input type="text" id="node-input-subject" />
|
|
@@ -239,6 +251,10 @@
|
|
|
239
251
|
<dt>BCC <span class="property-type">string | variable</span></dt>
|
|
240
252
|
<dd>Addresses to be blind-carbon-copied on the email.</dd>
|
|
241
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
|
+
|
|
242
258
|
<dt>Subject <span class="property-type">string | variable</span></dt>
|
|
243
259
|
<dd>The subject line of the email.</dd>
|
|
244
260
|
|
|
@@ -24,6 +24,7 @@ module.exports = function (RED) {
|
|
|
24
24
|
const to = RED.util.evaluateNodeProperty(config.to, config.toType, node, msg);
|
|
25
25
|
const cc = RED.util.evaluateNodeProperty(config.cc, config.ccType, node, msg) || '';
|
|
26
26
|
const bcc = RED.util.evaluateNodeProperty(config.bcc, config.bccType, node, msg) || '';
|
|
27
|
+
const replyTo = RED.util.evaluateNodeProperty(config.replyTo, config.replyToType, node, msg) || '';
|
|
27
28
|
const subject =
|
|
28
29
|
RED.util.evaluateNodeProperty(config.subject, config.subjectType, node, msg) ||
|
|
29
30
|
msg.topic ||
|
|
@@ -104,6 +105,7 @@ module.exports = function (RED) {
|
|
|
104
105
|
to: to,
|
|
105
106
|
cc: cc,
|
|
106
107
|
bcc: bcc,
|
|
108
|
+
replyTo: replyTo,
|
|
107
109
|
subject: subject,
|
|
108
110
|
html: Buffer.from(htmlContent, 'utf-8'),
|
|
109
111
|
attachments: processedAttachments,
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ const {
|
|
|
9
9
|
testUtils,
|
|
10
10
|
} = require('../helpers/email-receiver.mocks.js');
|
|
11
11
|
|
|
12
|
-
describe('
|
|
12
|
+
describe('E-Mail Receiver Node - Integration Tests', function () {
|
|
13
13
|
// Set a reasonable timeout for integration tests
|
|
14
14
|
this.timeout(10000);
|
|
15
15
|
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
const { expect } = require('chai');
|
|
2
2
|
const helper = require('node-red-node-test-helper');
|
|
3
|
-
const emailSender = require('../../email-sender/email-sender.js');
|
|
4
3
|
const {
|
|
5
|
-
createMockNodemailer,
|
|
6
4
|
setupModuleMocks,
|
|
7
|
-
getMockNode,
|
|
8
5
|
emailSenderConfigs,
|
|
9
6
|
testFlows,
|
|
10
7
|
testUtils,
|
|
11
8
|
} = require('../../test/helpers/email-sender.mocks.js');
|
|
12
9
|
|
|
13
|
-
describe('
|
|
10
|
+
describe('E-Mail Sender Node - Integration Tests', function () {
|
|
14
11
|
// Set a reasonable timeout for integration tests
|
|
15
12
|
this.timeout(10000);
|
|
16
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { expect } = require('chai');
|
|
2
2
|
const { createMockNodeRED, setupModuleMocks, testConfigs, testUtils } = require('../helpers/email-receiver.mocks.js');
|
|
3
3
|
|
|
4
|
-
describe('
|
|
4
|
+
describe('E-Mail Receiver Node - Unit Tests', function () {
|
|
5
5
|
this.timeout(10000);
|
|
6
6
|
|
|
7
7
|
let emailReceiverNode;
|