@@ 791-797 (lines=7) @@ | ||
788 | } |
|
789 | ||
790 | // check to see if they are a dynamic reply to. eg based on a email field a user selected |
|
791 | if ($recipient->SendEmailFromField()) { |
|
792 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailFromField()->Name); |
|
793 | ||
794 | if ($submittedFormField && is_string($submittedFormField->Value)) { |
|
795 | $email->setReplyTo($submittedFormField->Value); |
|
796 | } |
|
797 | } |
|
798 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
799 | if ($recipient->SendEmailToField()) { |
|
800 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
@@ 799-805 (lines=7) @@ | ||
796 | } |
|
797 | } |
|
798 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
799 | if ($recipient->SendEmailToField()) { |
|
800 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
801 | ||
802 | if ($submittedFormField && is_string($submittedFormField->Value)) { |
|
803 | $email->setTo($submittedFormField->Value); |
|
804 | } |
|
805 | } |
|
806 | ||
807 | // check to see if there is a dynamic subject |
|
808 | if ($recipient->SendEmailSubjectField()) { |
|
@@ 808-814 (lines=7) @@ | ||
805 | } |
|
806 | ||
807 | // check to see if there is a dynamic subject |
|
808 | if ($recipient->SendEmailSubjectField()) { |
|
809 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailSubjectField()->Name); |
|
810 | ||
811 | if ($submittedFormField && trim($submittedFormField->Value)) { |
|
812 | $email->setSubject($submittedFormField->Value); |
|
813 | } |
|
814 | } |
|
815 | ||
816 | $this->extend('updateEmail', $email, $recipient, $emailData); |
|
817 |