diff --git a/back/methods/docuware/deliveryNoteEmail.js b/back/methods/docuware/deliveryNoteEmail.js index 1497dcdf9..1557a3a87 100644 --- a/back/methods/docuware/deliveryNoteEmail.js +++ b/back/methods/docuware/deliveryNoteEmail.js @@ -58,7 +58,10 @@ module.exports = Self => { for (const param in args) params[param] = args[param]; - if (!recipient) params.recipient = models.Client.findById(recipientId, {fields: ['email']}); + if (!recipient) { + client = await models.Client.findById(recipientId, {fields: ['email']}); + params.recipient = client.email; + } const email = new Email('delivery-note', params);