Browse Source

Make 'to' field undefined if empty for consistent validation

master
Mel O'Hagan 4 years ago
parent
commit
4d2159f354
  1. 1
      packages/server/src/automations/steps/sendSmtpEmail.js

1
packages/server/src/automations/steps/sendSmtpEmail.js

@ -53,6 +53,7 @@ exports.run = async function ({ inputs }) {
if (!contents) { if (!contents) {
contents = "<h1>No content</h1>" contents = "<h1>No content</h1>"
} }
to = to || undefined
try { try {
let response = await sendSmtpEmail(to, from, subject, contents, true) let response = await sendSmtpEmail(to, from, subject, contents, true)
return { return {

Loading…
Cancel
Save