mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
🔀 Merge pull request #473 from RicardoE105/feature/mailjet-fix
🐛 fix subject field
This commit is contained in:
commit
67ce56b572
|
@ -98,6 +98,7 @@ export class Mailjet implements INodeType {
|
|||
const fromEmail = this.getNodeParameter('fromEmail', i) as string;
|
||||
const htmlBody = this.getNodeParameter('html', 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 toEmail = (this.getNodeParameter('toEmail', i) as string).split(',') as string[];
|
||||
const variables = (this.getNodeParameter('variablesUi', i) as IDataObject).variablesValues as IDataObject[];
|
||||
|
@ -108,6 +109,7 @@ export class Mailjet implements INodeType {
|
|||
From: {
|
||||
email: fromEmail,
|
||||
},
|
||||
subject,
|
||||
to: [],
|
||||
Cc: [],
|
||||
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) {
|
||||
//@ts-ignore
|
||||
body.Messages[0].TrackOpens = additionalFields.trackOpens as string;
|
||||
|
|
Loading…
Reference in a new issue