@kirimemail/n8n-nodes-smtp-management 0.2.0 → 0.3.0

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.
Files changed (23) hide show
  1. package/README.md +22 -0
  2. package/dist/credentials/KirimEmailSmtpUserApi.credentials.js +16 -2
  3. package/dist/credentials/KirimEmailSmtpUserApi.credentials.js.map +1 -1
  4. package/dist/credentials/KirimEmailSmtpWebhookApi.credentials.d.ts +10 -0
  5. package/dist/credentials/KirimEmailSmtpWebhookApi.credentials.js +63 -0
  6. package/dist/credentials/KirimEmailSmtpWebhookApi.credentials.js.map +1 -0
  7. package/dist/nodes/KirimEmailMessage/KirimEmailMessage.node.d.ts +5 -0
  8. package/dist/nodes/KirimEmailMessage/KirimEmailMessage.node.js +402 -0
  9. package/dist/nodes/KirimEmailMessage/KirimEmailMessage.node.js.map +1 -0
  10. package/dist/nodes/KirimEmailMessage/assets/logo-bg-black.svg +1 -0
  11. package/dist/nodes/KirimEmailMessage/assets/logo-bg-white.svg +1 -0
  12. package/dist/nodes/KirimEmailQuota/KirimEmailQuota.node.js +1 -1
  13. package/dist/nodes/KirimEmailQuota/KirimEmailQuota.node.js.map +1 -1
  14. package/dist/nodes/KirimEmailSmtpWebhookTrigger/KirimEmailSmtpWebhookTrigger.node.d.ts +5 -0
  15. package/dist/nodes/KirimEmailSmtpWebhookTrigger/KirimEmailSmtpWebhookTrigger.node.js +95 -0
  16. package/dist/nodes/KirimEmailSmtpWebhookTrigger/KirimEmailSmtpWebhookTrigger.node.js.map +1 -0
  17. package/dist/nodes/KirimEmailSmtpWebhookTrigger/assets/logo-bg-black.svg +1 -0
  18. package/dist/nodes/KirimEmailSmtpWebhookTrigger/assets/logo-bg-white.svg +1 -0
  19. package/dist/nodes/KirimEmailValidation/KirimEmailValidation.node.js +1 -1
  20. package/dist/nodes/KirimEmailValidation/KirimEmailValidation.node.js.map +1 -1
  21. package/dist/package.json +8 -5
  22. package/dist/tsconfig.tsbuildinfo +1 -1
  23. package/package.json +8 -5
package/README.md CHANGED
@@ -35,6 +35,19 @@ Check quota information.
35
35
 
36
36
  - **Get** - Get current quota information
37
37
 
38
+ ### KirimEmail SMTP Webhook Trigger
39
+
40
+ Receive webhook events from Kirim.Email SMTP.
41
+
42
+ **Events:**
43
+
44
+ - Email queued, sent, delivered, bounced, etc.
45
+ - Automatic signature verification
46
+
47
+ **Fields:**
48
+
49
+ - Simplify Output - Return a simplified output with essential fields only
50
+
38
51
  ## Credentials
39
52
 
40
53
  ### KirimEmail SMTP User API
@@ -44,6 +57,15 @@ Check quota information.
44
57
  3. Copy your API token
45
58
  4. Use the API token as the password in n8n credential (username is `api`)
46
59
 
60
+ ### KirimEmail SMTP Webhook API
61
+
62
+ Required for the KirimEmail SMTP Webhook Trigger node.
63
+
64
+ 1. Log in to your [Kirim.Email](https://smtp.kirim.email) account
65
+ 2. Navigate to your domain settings
66
+ 3. Copy your API key and API secret
67
+ 4. Enter your verified domain name
68
+
47
69
  ## Compatibility
48
70
 
49
71
  Compatible with n8n@1.60.0 or later
@@ -11,6 +11,13 @@ class KirimEmailSmtpUserApi {
11
11
  };
12
12
  this.documentationUrl = 'https://smtp.kirim.email';
13
13
  this.properties = [
14
+ {
15
+ displayName: 'Username',
16
+ name: 'username',
17
+ type: 'string',
18
+ default: '',
19
+ description: 'The username for authentication',
20
+ },
14
21
  {
15
22
  displayName: 'API Token',
16
23
  name: 'apiToken',
@@ -19,19 +26,26 @@ class KirimEmailSmtpUserApi {
19
26
  default: '',
20
27
  description: 'The API token for authentication',
21
28
  },
29
+ {
30
+ displayName: 'Base URL',
31
+ name: 'baseUrl',
32
+ type: 'string',
33
+ default: 'https://smtp-app.kirim.email',
34
+ description: 'The base URL for the API',
35
+ },
22
36
  ];
23
37
  this.authenticate = {
24
38
  type: 'generic',
25
39
  properties: {
26
40
  auth: {
27
- username: 'api',
41
+ username: '={{$credentials.username}}',
28
42
  password: '={{$credentials.apiToken}}',
29
43
  },
30
44
  },
31
45
  };
32
46
  this.test = {
33
47
  request: {
34
- baseURL: 'https://smtp-app.kirim.email',
48
+ baseURL: '={{$credentials.baseUrl}}',
35
49
  url: '/api/quota',
36
50
  method: 'GET',
37
51
  },
@@ -1 +1 @@
1
- {"version":3,"file":"KirimEmailSmtpUserApi.credentials.js","sourceRoot":"","sources":["../../credentials/KirimEmailSmtpUserApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,qBAAqB;IAAlC;QACC,SAAI,GAAG,uBAAuB,CAAC;QAE/B,gBAAW,GAAG,0BAA0B,CAAC;QAEzC,SAAI,GAAS;YACZ,KAAK,EAAE,+BAA+B;YACtC,IAAI,EAAE,+BAA+B;SACrC,CAAC;QAEF,qBAAgB,GAAG,0BAA0B,CAAC;QAE9C,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,kCAAkC;aAC/C;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,IAAI,EAAE;oBACL,QAAQ,EAAE,KAAK;oBACf,QAAQ,EAAE,4BAA4B;iBACtC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,8BAA8B;gBACvC,GAAG,EAAE,YAAY;gBACjB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAxCD,sDAwCC"}
1
+ {"version":3,"file":"KirimEmailSmtpUserApi.credentials.js","sourceRoot":"","sources":["../../credentials/KirimEmailSmtpUserApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,qBAAqB;IAAlC;QACC,SAAI,GAAG,uBAAuB,CAAC;QAE/B,gBAAW,GAAG,0BAA0B,CAAC;QAEzC,SAAI,GAAS;YACZ,KAAK,EAAE,+BAA+B;YACtC,IAAI,EAAE,+BAA+B;SACrC,CAAC;QAEF,qBAAgB,GAAG,0BAA0B,CAAC;QAE9C,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,iCAAiC;aAC9C;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,kCAAkC;aAC/C;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,8BAA8B;gBACvC,WAAW,EAAE,0BAA0B;aACvC;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,IAAI,EAAE;oBACL,QAAQ,EAAE,4BAA4B;oBACtC,QAAQ,EAAE,4BAA4B;iBACtC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,2BAA2B;gBACpC,GAAG,EAAE,YAAY;gBACjB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAtDD,sDAsDC"}
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class KirimEmailSmtpWebhookApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KirimEmailSmtpWebhookApi = void 0;
4
+ class KirimEmailSmtpWebhookApi {
5
+ constructor() {
6
+ this.name = 'kirimEmailSmtpWebhookApi';
7
+ this.displayName = 'KirimEmail SMTP Webhook API';
8
+ this.icon = {
9
+ light: 'file:assets/logo-bg-white.svg',
10
+ dark: 'file:assets/logo-bg-black.svg',
11
+ };
12
+ this.documentationUrl = 'https://smtp-app.kirim.email/docs';
13
+ this.properties = [
14
+ {
15
+ displayName: 'API Key',
16
+ name: 'apiKey',
17
+ type: 'string',
18
+ typeOptions: { password: true },
19
+ default: '',
20
+ placeholder: 'key_4909************************e8d6',
21
+ description: 'API key for authentication.',
22
+ },
23
+ {
24
+ displayName: 'Domain',
25
+ name: 'domain',
26
+ type: 'string',
27
+ default: '',
28
+ placeholder: 'example.id',
29
+ description: 'Domain name for webhook signature verification.',
30
+ },
31
+ {
32
+ displayName: 'API Secret',
33
+ name: 'apiSecret',
34
+ type: 'string',
35
+ typeOptions: { password: true },
36
+ default: '',
37
+ placeholder: '8ad78587************************66db',
38
+ description: 'API secret for webhook signature verification.',
39
+ },
40
+ ];
41
+ this.authenticate = {
42
+ type: 'generic',
43
+ properties: {
44
+ auth: {
45
+ username: '={{$credentials.apiKey}}',
46
+ password: '={{$credentials.apiSecret}}',
47
+ },
48
+ headers: {
49
+ domain: '={{$credentials.domain}}',
50
+ },
51
+ },
52
+ };
53
+ this.test = {
54
+ request: {
55
+ baseURL: 'https://smtp-app.kirim.email',
56
+ url: '/api/v4/transactional/log',
57
+ method: 'GET',
58
+ },
59
+ };
60
+ }
61
+ }
62
+ exports.KirimEmailSmtpWebhookApi = KirimEmailSmtpWebhookApi;
63
+ //# sourceMappingURL=KirimEmailSmtpWebhookApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KirimEmailSmtpWebhookApi.credentials.js","sourceRoot":"","sources":["../../credentials/KirimEmailSmtpWebhookApi.credentials.ts"],"names":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"}
@@ -0,0 +1,5 @@
1
+ import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type INodeExecutionData } from 'n8n-workflow';
2
+ export declare class KirimEmailMessage implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,402 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KirimEmailMessage = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const n8n_workflow_2 = require("n8n-workflow");
6
+ class KirimEmailMessage {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: 'KirimEmail Message',
10
+ name: 'kirimEmailMessage',
11
+ icon: {
12
+ light: 'file:assets/logo-bg-white.svg',
13
+ dark: 'file:assets/logo-bg-black.svg',
14
+ },
15
+ group: ['output'],
16
+ version: 1,
17
+ subtitle: '={{$parameter["operation"]}}',
18
+ description: 'Send transactional emails using Kirim.Email SMTP',
19
+ defaults: {
20
+ name: 'KirimEmail Message',
21
+ },
22
+ usableAsTool: true,
23
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
24
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
25
+ credentials: [
26
+ {
27
+ name: 'kirimEmailSmtpUserApi',
28
+ required: true,
29
+ },
30
+ ],
31
+ properties: [
32
+ {
33
+ displayName: 'Operation',
34
+ name: 'operation',
35
+ type: 'options',
36
+ noDataExpression: true,
37
+ options: [
38
+ {
39
+ name: 'Send',
40
+ value: 'send',
41
+ description: 'Send a transactional email',
42
+ action: 'Send email',
43
+ },
44
+ {
45
+ name: 'Send with Template',
46
+ value: 'sendTemplate',
47
+ description: 'Send email using a saved template',
48
+ action: 'Send template email',
49
+ },
50
+ ],
51
+ default: 'send',
52
+ },
53
+ {
54
+ displayName: 'Domain',
55
+ name: 'domain',
56
+ type: 'string',
57
+ required: true,
58
+ placeholder: 'example.com',
59
+ description: 'The domain name owned by the authenticated user',
60
+ displayOptions: {
61
+ show: {
62
+ operation: ['send', 'sendTemplate'],
63
+ },
64
+ },
65
+ default: '',
66
+ },
67
+ {
68
+ displayName: 'From',
69
+ name: 'from',
70
+ type: 'string',
71
+ required: true,
72
+ placeholder: 'noreply@example.com',
73
+ description: 'Sender email address. Must belong to the authenticated domain.',
74
+ displayOptions: {
75
+ show: {
76
+ operation: ['send'],
77
+ },
78
+ },
79
+ default: '',
80
+ },
81
+ {
82
+ displayName: 'From Name',
83
+ name: 'fromName',
84
+ type: 'string',
85
+ placeholder: 'Company Name',
86
+ description: 'Optional sender display name',
87
+ displayOptions: {
88
+ show: {
89
+ operation: ['send', 'sendTemplate'],
90
+ },
91
+ },
92
+ default: '',
93
+ },
94
+ {
95
+ displayName: 'To',
96
+ name: 'to',
97
+ type: 'string',
98
+ required: true,
99
+ placeholder: 'recipient@example.com',
100
+ description: 'Recipient email address(es). For multiple recipients, use comma-separated emails.',
101
+ displayOptions: {
102
+ show: {
103
+ operation: ['send', 'sendTemplate'],
104
+ },
105
+ },
106
+ default: '',
107
+ },
108
+ {
109
+ displayName: 'Subject',
110
+ name: 'subject',
111
+ type: 'string',
112
+ required: true,
113
+ placeholder: 'Email Subject',
114
+ description: 'Email subject line',
115
+ displayOptions: {
116
+ show: {
117
+ operation: ['send'],
118
+ },
119
+ },
120
+ default: '',
121
+ },
122
+ {
123
+ displayName: 'Text Body',
124
+ name: 'text',
125
+ type: 'string',
126
+ typeOptions: {
127
+ rows: 10,
128
+ },
129
+ required: true,
130
+ description: 'Plain text content for the email body',
131
+ displayOptions: {
132
+ show: {
133
+ operation: ['send'],
134
+ },
135
+ },
136
+ default: '',
137
+ },
138
+ {
139
+ displayName: 'HTML Body',
140
+ name: 'html',
141
+ type: 'string',
142
+ typeOptions: {
143
+ rows: 10,
144
+ },
145
+ description: 'Optional HTML content for the email body',
146
+ displayOptions: {
147
+ show: {
148
+ operation: ['send'],
149
+ },
150
+ },
151
+ default: '',
152
+ },
153
+ {
154
+ displayName: 'Template ID',
155
+ name: 'templateGuid',
156
+ type: 'string',
157
+ required: true,
158
+ placeholder: '550e8400-e29b-41d4-a716-446655440000',
159
+ description: 'UUID of the template to use',
160
+ displayOptions: {
161
+ show: {
162
+ operation: ['sendTemplate'],
163
+ },
164
+ },
165
+ default: '',
166
+ },
167
+ {
168
+ displayName: 'Variables',
169
+ name: 'variables',
170
+ type: 'string',
171
+ typeOptions: {
172
+ rows: 5,
173
+ },
174
+ description: 'Variables for template replacement as JSON object. Example: {"name": "John", "product": "Widget"}.',
175
+ displayOptions: {
176
+ show: {
177
+ operation: ['sendTemplate'],
178
+ },
179
+ },
180
+ default: '',
181
+ },
182
+ {
183
+ displayName: 'Reply To',
184
+ name: 'replyTo',
185
+ type: 'string',
186
+ placeholder: 'support@example.com',
187
+ description: 'Reply-to email address. Must share the same top-level domain as the from address.',
188
+ displayOptions: {
189
+ show: {
190
+ operation: ['send', 'sendTemplate'],
191
+ },
192
+ },
193
+ default: '',
194
+ },
195
+ {
196
+ displayName: 'Headers (JSON)',
197
+ name: 'headers',
198
+ type: 'string',
199
+ typeOptions: {
200
+ rows: 3,
201
+ },
202
+ description: 'Optional custom email headers as JSON. Example: {"X-Campaign-ID": "welcome-series"}.',
203
+ displayOptions: {
204
+ show: {
205
+ operation: ['send', 'sendTemplate'],
206
+ },
207
+ },
208
+ default: '',
209
+ },
210
+ {
211
+ displayName: 'Attachments',
212
+ name: 'attachments',
213
+ type: 'string',
214
+ typeOptions: {
215
+ multipleValues: true,
216
+ },
217
+ description: 'Binary properties containing attachments',
218
+ displayOptions: {
219
+ show: {
220
+ operation: ['send', 'sendTemplate'],
221
+ },
222
+ },
223
+ default: '',
224
+ },
225
+ ],
226
+ };
227
+ }
228
+ async execute() {
229
+ var _a;
230
+ const items = this.getInputData();
231
+ const returnData = [];
232
+ for (let i = 0; i < items.length; i++) {
233
+ try {
234
+ const operation = this.getNodeParameter('operation', i);
235
+ const domain = this.getNodeParameter('domain', i);
236
+ if (!domain) {
237
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'Domain is required', { itemIndex: i });
238
+ }
239
+ let endpoint = '';
240
+ const formData = {};
241
+ if (operation === 'send') {
242
+ endpoint = `/api/domains/${domain}/message`;
243
+ const from = this.getNodeParameter('from', i);
244
+ const to = this.getNodeParameter('to', i);
245
+ const subject = this.getNodeParameter('subject', i);
246
+ const text = this.getNodeParameter('text', i);
247
+ if (!from) {
248
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'From email is required', {
249
+ itemIndex: i,
250
+ });
251
+ }
252
+ if (!to) {
253
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'To email is required', { itemIndex: i });
254
+ }
255
+ if (!subject) {
256
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'Subject is required', { itemIndex: i });
257
+ }
258
+ if (!text) {
259
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'Text body is required', { itemIndex: i });
260
+ }
261
+ formData.from = from;
262
+ formData.to = to;
263
+ formData.subject = subject;
264
+ formData.text = text;
265
+ const fromName = this.getNodeParameter('fromName', i);
266
+ if (fromName) {
267
+ formData.from_name = fromName;
268
+ }
269
+ const html = this.getNodeParameter('html', i);
270
+ if (html) {
271
+ formData.html = html;
272
+ }
273
+ const replyTo = this.getNodeParameter('replyTo', i);
274
+ if (replyTo) {
275
+ formData.reply_to = replyTo;
276
+ }
277
+ const headers = this.getNodeParameter('headers', i);
278
+ if (headers) {
279
+ try {
280
+ JSON.parse(headers);
281
+ formData.headers = headers;
282
+ }
283
+ catch {
284
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'Headers must be valid JSON', {
285
+ itemIndex: i,
286
+ });
287
+ }
288
+ }
289
+ }
290
+ else if (operation === 'sendTemplate') {
291
+ endpoint = `/api/domains/${domain}/message/template`;
292
+ const templateGuid = this.getNodeParameter('templateGuid', i);
293
+ const to = this.getNodeParameter('to', i);
294
+ if (!templateGuid) {
295
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'Template ID is required', {
296
+ itemIndex: i,
297
+ });
298
+ }
299
+ if (!to) {
300
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'To email is required', { itemIndex: i });
301
+ }
302
+ formData.template_guid = templateGuid;
303
+ formData.to = to;
304
+ const from = this.getNodeParameter('from', i);
305
+ if (from) {
306
+ formData.from = from;
307
+ }
308
+ const fromName = this.getNodeParameter('fromName', i);
309
+ if (fromName) {
310
+ formData.from_name = fromName;
311
+ }
312
+ const variables = this.getNodeParameter('variables', i);
313
+ if (variables) {
314
+ try {
315
+ JSON.parse(variables);
316
+ formData.variables = variables;
317
+ }
318
+ catch {
319
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'Variables must be valid JSON', {
320
+ itemIndex: i,
321
+ });
322
+ }
323
+ }
324
+ const replyTo = this.getNodeParameter('replyTo', i);
325
+ if (replyTo) {
326
+ formData.reply_to = replyTo;
327
+ }
328
+ const headers = this.getNodeParameter('headers', i);
329
+ if (headers) {
330
+ try {
331
+ JSON.parse(headers);
332
+ formData.headers = headers;
333
+ }
334
+ catch {
335
+ throw new n8n_workflow_2.NodeOperationError(this.getNode(), 'Headers must be valid JSON', {
336
+ itemIndex: i,
337
+ });
338
+ }
339
+ }
340
+ }
341
+ const attachmentProps = this.getNodeParameter('attachments', i, '') || '';
342
+ const binaryDataKeys = attachmentProps
343
+ ? attachmentProps
344
+ .split(',')
345
+ .map((s) => s.trim())
346
+ .filter(Boolean)
347
+ : [];
348
+ if (binaryDataKeys.length > 0) {
349
+ const attachments = [];
350
+ for (const key of binaryDataKeys) {
351
+ const binaryData = (_a = items[i].binary) === null || _a === void 0 ? void 0 : _a[key];
352
+ if (binaryData) {
353
+ attachments.push({
354
+ filename: binaryData.fileName || key,
355
+ content: Buffer.from(binaryData.data, 'base64'),
356
+ contentType: binaryData.mimeType || 'application/octet-stream',
357
+ });
358
+ }
359
+ }
360
+ if (attachments.length > 0) {
361
+ formData.attachments = attachments.map((att) => ({
362
+ value: att.content,
363
+ options: {
364
+ filename: att.filename,
365
+ contentType: att.contentType,
366
+ },
367
+ }));
368
+ }
369
+ }
370
+ const credentials = await this.getCredentials('kirimEmailSmtpUserApi');
371
+ const baseUrl = credentials.baseUrl;
372
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'kirimEmailSmtpUserApi', {
373
+ method: 'POST',
374
+ url: `${baseUrl}${endpoint}`,
375
+ formData: formData,
376
+ });
377
+ returnData.push({
378
+ json: response,
379
+ pairedItem: { item: i },
380
+ });
381
+ }
382
+ catch (error) {
383
+ if (this.continueOnFail()) {
384
+ returnData.push({
385
+ json: {
386
+ error: error.message,
387
+ },
388
+ pairedItem: { item: i },
389
+ });
390
+ continue;
391
+ }
392
+ if (error instanceof n8n_workflow_2.NodeApiError || error instanceof n8n_workflow_2.NodeOperationError) {
393
+ throw error;
394
+ }
395
+ throw new n8n_workflow_2.NodeApiError(this.getNode(), { message: error.message, name: error.name }, { itemIndex: i });
396
+ }
397
+ }
398
+ return [returnData];
399
+ }
400
+ }
401
+ exports.KirimEmailMessage = KirimEmailMessage;
402
+ //# sourceMappingURL=KirimEmailMessage.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KirimEmailMessage.node.js","sourceRoot":"","sources":["../../../nodes/KirimEmailMessage/KirimEmailMessage.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AACtB,+CAAgE;AAQhE,MAAa,iBAAiB;IAA9B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE;gBACL,KAAK,EAAE,+BAA+B;gBACtC,IAAI,EAAE,+BAA+B;aACrC;YACD,KAAK,EAAE,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE;gBACT,IAAI,EAAE,oBAAoB;aAC1B;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,E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