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