Merge pull request #900 from scott1702/feature/pulls/4.6/injectable-emails

Allow userforms email to be injectable
This commit is contained in:
Robbie Averill 2019-08-14 13:31:00 +12:00 committed by GitHub
commit c553da73c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {