@@ 761-767 (lines=7) @@ | ||
758 | } |
|
759 | ||
760 | // check to see if they are a dynamic reply to. eg based on a email field a user selected |
|
761 | if ($recipient->SendEmailFromField()) { |
|
762 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailFromField()->Name); |
|
763 | ||
764 | if ($submittedFormField && is_string($submittedFormField->Value)) { |
|
765 | $email->setReplyTo($submittedFormField->Value); |
|
766 | } |
|
767 | } |
|
768 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
769 | if ($recipient->SendEmailToField()) { |
|
770 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
@@ 769-775 (lines=7) @@ | ||
766 | } |
|
767 | } |
|
768 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
769 | if ($recipient->SendEmailToField()) { |
|
770 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
771 | ||
772 | if ($submittedFormField && is_string($submittedFormField->Value)) { |
|
773 | $email->setTo($submittedFormField->Value); |
|
774 | } |
|
775 | } |
|
776 | ||
777 | // check to see if there is a dynamic subject |
|
778 | if ($recipient->SendEmailSubjectField()) { |
|
@@ 778-784 (lines=7) @@ | ||
775 | } |
|
776 | ||
777 | // check to see if there is a dynamic subject |
|
778 | if ($recipient->SendEmailSubjectField()) { |
|
779 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailSubjectField()->Name); |
|
780 | ||
781 | if ($submittedFormField && trim($submittedFormField->Value)) { |
|
782 | $email->setSubject($submittedFormField->Value); |
|
783 | } |
|
784 | } |
|
785 | ||
786 | $this->extend('updateEmail', $email, $recipient, $emailData); |
|
787 |