@@ 715-721 (lines=7) @@ | ||
712 | } |
|
713 | ||
714 | // check to see if they are a dynamic reply to. eg based on a email field a user selected |
|
715 | if($recipient->SendEmailFromField()) { |
|
716 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailFromField()->Name); |
|
717 | ||
718 | if($submittedFormField && is_string($submittedFormField->Value)) { |
|
719 | $email->setReplyTo($submittedFormField->Value); |
|
720 | } |
|
721 | } |
|
722 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
723 | if($recipient->SendEmailToField()) { |
|
724 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
@@ 723-729 (lines=7) @@ | ||
720 | } |
|
721 | } |
|
722 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
723 | if($recipient->SendEmailToField()) { |
|
724 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
725 | ||
726 | if($submittedFormField && is_string($submittedFormField->Value)) { |
|
727 | $email->setTo($submittedFormField->Value); |
|
728 | } |
|
729 | } |
|
730 | ||
731 | // check to see if there is a dynamic subject |
|
732 | if($recipient->SendEmailSubjectField()) { |
|
@@ 732-738 (lines=7) @@ | ||
729 | } |
|
730 | ||
731 | // check to see if there is a dynamic subject |
|
732 | if($recipient->SendEmailSubjectField()) { |
|
733 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailSubjectField()->Name); |
|
734 | ||
735 | if($submittedFormField && trim($submittedFormField->Value)) { |
|
736 | $email->setSubject($submittedFormField->Value); |
|
737 | } |
|
738 | } |
|
739 | ||
740 | $this->extend('updateEmail', $email, $recipient, $emailData); |
|
741 |