fix(core): update

This commit is contained in:
2020-08-11 14:47:25 +00:00
parent 13e064207f
commit b08b9abb38
4 changed files with 10029 additions and 409 deletions

View File

@ -19,7 +19,8 @@ export class MailgunAccount {
headers: {
Authorization: `Basic ${plugins.smartstring.base64.encode(`api:${this.apiToken}`)}`,
'Content-Type': 'application/json'
}
},
keepAlive: false
};
let response: plugins.smartrequest.IExtendedIncomingMessage;
if (!binaryArg) {
@ -37,7 +38,8 @@ export class MailgunAccount {
{
headers: {
Authorization: `Basic ${plugins.smartstring.base64.encode(`api:${this.apiToken}`)}`
}
},
keepAlive: false
},
formFields
);
@ -68,13 +70,23 @@ export class MailgunAccount {
name: 'subject',
type: 'string',
payload: smartmailArg.getSubject(dataArg)
},
{
}
];
if (smartmailArg.getBody(dataArg)) {
formFields.push({
name: 'html',
type: 'string',
payload: smartmailArg.getBody(dataArg)
}
];
});
} else {
console.log('message has no body');
formFields.push({
name: 'html',
type: 'string',
payload: 'The sender did not provide a bodytext.'
});
}
console.log(smartmailArg.attachments);