mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 21:37:32 -08:00
🐛 fix subject field
This commit is contained in:
parent
be9474e84a
commit
5521dd9ada
|
@ -98,6 +98,7 @@ export class Mailjet implements INodeType {
|
||||||
const fromEmail = this.getNodeParameter('fromEmail', i) as string;
|
const fromEmail = this.getNodeParameter('fromEmail', i) as string;
|
||||||
const htmlBody = this.getNodeParameter('html', i) as string;
|
const htmlBody = this.getNodeParameter('html', i) as string;
|
||||||
const textBody = this.getNodeParameter('text', i) as string;
|
const textBody = this.getNodeParameter('text', i) as string;
|
||||||
|
const subject = this.getNodeParameter('subject', i) as string;
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||||
const toEmail = (this.getNodeParameter('toEmail', i) as string).split(',') as string[];
|
const toEmail = (this.getNodeParameter('toEmail', i) as string).split(',') as string[];
|
||||||
const variables = (this.getNodeParameter('variablesUi', i) as IDataObject).variablesValues as IDataObject[];
|
const variables = (this.getNodeParameter('variablesUi', i) as IDataObject).variablesValues as IDataObject[];
|
||||||
|
@ -108,6 +109,7 @@ export class Mailjet implements INodeType {
|
||||||
From: {
|
From: {
|
||||||
email: fromEmail,
|
email: fromEmail,
|
||||||
},
|
},
|
||||||
|
subject,
|
||||||
to: [],
|
to: [],
|
||||||
Cc: [],
|
Cc: [],
|
||||||
Bcc: [],
|
Bcc: [],
|
||||||
|
@ -154,10 +156,6 @@ export class Mailjet implements INodeType {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (additionalFields.subject) {
|
|
||||||
//@ts-ignore
|
|
||||||
body.Messages[0].subject = additionalFields.subject as string;
|
|
||||||
}
|
|
||||||
if (additionalFields.trackOpens) {
|
if (additionalFields.trackOpens) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
body.Messages[0].TrackOpens = additionalFields.trackOpens as string;
|
body.Messages[0].TrackOpens = additionalFields.trackOpens as string;
|
||||||
|
|
Loading…
Reference in a new issue