@@ 625-631 (lines=7) @@ | ||
622 | } |
|
623 | ||
624 | // check to see if they are a dynamic reply to. eg based on a email field a user selected |
|
625 | if ($recipient->SendEmailFromField()) { |
|
626 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailFromField()->Name); |
|
627 | ||
628 | if ($submittedFormField && is_string($submittedFormField->Value)) { |
|
629 | $email->setReplyTo($submittedFormField->Value); |
|
630 | } |
|
631 | } |
|
632 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
633 | if ($recipient->SendEmailToField()) { |
|
634 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
@@ 633-639 (lines=7) @@ | ||
630 | } |
|
631 | } |
|
632 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
633 | if ($recipient->SendEmailToField()) { |
|
634 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
635 | ||
636 | if ($submittedFormField && is_string($submittedFormField->Value)) { |
|
637 | $email->setTo($submittedFormField->Value); |
|
638 | } |
|
639 | } |
|
640 | ||
641 | // check to see if there is a dynamic subject |
|
642 | if ($recipient->SendEmailSubjectField()) { |
|
@@ 642-648 (lines=7) @@ | ||
639 | } |
|
640 | ||
641 | // check to see if there is a dynamic subject |
|
642 | if ($recipient->SendEmailSubjectField()) { |
|
643 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailSubjectField()->Name); |
|
644 | ||
645 | if ($submittedFormField && trim($submittedFormField->Value)) { |
|
646 | $email->setSubject($submittedFormField->Value); |
|
647 | } |
|
648 | } |
|
649 | ||
650 | $this->extend('updateEmail', $email, $recipient, $emailData); |
|
651 |