🐛 Add missing parameter when sending variables (Mailjet)

This commit is contained in:
ricardo 2021-05-02 15:05:44 -04:00
parent 7f0f8deb6d
commit fd72c0ece6
2 changed files with 11 additions and 6 deletions

View file

@ -31,9 +31,9 @@ export const emailOperations = [
export const emailFields = [
/* -------------------------------------------------------------------------- */
/* email:send */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* email:send */
/* -------------------------------------------------------------------------- */
{
displayName: 'From Email',
name: 'fromEmail',
@ -258,9 +258,9 @@ export const emailFields = [
},
],
},
/* -------------------------------------------------------------------------- */
/* email:sendTemplate */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* email:sendTemplate */
/* -------------------------------------------------------------------------- */
{
displayName: 'From Email',
name: 'fromEmail',

View file

@ -128,6 +128,8 @@ export class Mailjet implements INodeType {
for (const variable of variables) {
//@ts-ignore
body.Messages[0].Variables[variable.name] = variable.value;
//@ts-ignore
body.Messages[0].TemplateLanguage = true;
}
}
if (htmlBody) {
@ -200,6 +202,7 @@ export class Mailjet implements INodeType {
Cc: [],
Bcc: [],
Variables: {},
TemplateLanguage: false,
TemplateID: templateId,
},
],
@ -215,6 +218,8 @@ export class Mailjet implements INodeType {
for (const variable of variables) {
//@ts-ignore
body.Messages[0].Variables[variable.name] = variable.value;
//@ts-ignore
body.Messages[0].TemplateLanguage = true;
}
}
if (additionalFields.bccEmail) {