fix(core): update
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user