Merge pull request #618 from galaxycard/development

allow attachments from api
This commit is contained in:
Tomas Bures 2019-07-03 20:33:46 +02:00 committed by GitHub
commit 75138f9728
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -48,7 +48,8 @@ class TemplateSender {
return mailer.sendTransactionalMail( return mailer.sendTransactionalMail(
{ {
to: options.email, to: options.email,
subject subject,
attachments: options.attachments || []
}, },
{ {
html: { template: html }, html: { template: html },

View file

@ -308,7 +308,8 @@ router.postAsync('/templates/:templateId/send', async (req, res) => {
email: input.EMAIL, email: input.EMAIL,
sendConfigurationId: input.SEND_CONFIGURATION_ID, sendConfigurationId: input.SEND_CONFIGURATION_ID,
subject: input.SUBJECT, subject: input.SUBJECT,
variables: input.VARIABLES variables: input.VARIABLES,
attachments: input.ATTACHMENTS || []
}); });
res.status(200).json({ data: info }); res.status(200).json({ data: info });
} catch (e) { } catch (e) {