2
0

feat(integrations): 🚸 Add Reply-To field for email sending

This commit is contained in:
Baptiste Arnaud
2022-03-22 10:54:11 +01:00
parent d4022c6e3f
commit ddb6798eba
5 changed files with 39 additions and 3 deletions

View File

@ -241,6 +241,7 @@ const sendEmail = async (
return step.outgoingEdgeId
}
const { options } = step
const replyTo = parseVariables(variables)(options.replyTo)
const { error } = await sendRequest({
url: `${apiHost}/api/integrations/email`,
method: 'POST',
@ -251,6 +252,7 @@ const sendEmail = async (
body: parseVariables(variables)(options.body ?? ''),
cc: (options.cc ?? []).map(parseVariables(variables)),
bcc: (options.bcc ?? []).map(parseVariables(variables)),
replyTo: replyTo !== '' ? replyTo : undefined,
},
})
onNewLog(