Allow userforms email to be injectable

This commit is contained in:
Scott Hutchinson 2019-08-14 13:22:32 +12:00
parent 8e189c2c49
commit 3077a64b3c

View File

@ -578,7 +578,7 @@ JS
// email users on submit. // email users on submit.
if ($recipients = $this->FilteredEmailRecipients($data, $form)) { if ($recipients = $this->FilteredEmailRecipients($data, $form)) {
foreach ($recipients as $recipient) { foreach ($recipients as $recipient) {
$email = new UserFormRecipientEmail($submittedFields); $email = UserFormRecipientEmail::create($submittedFields);
$mergeFields = $this->getMergeFieldsMap($emailData['Fields']); $mergeFields = $this->getMergeFieldsMap($emailData['Fields']);
if ($attachments) { if ($attachments) {