@@ 327-333 (lines=7) @@ | ||
324 | } |
|
325 | ||
326 | // check to see if they are a dynamic reply to. eg based on a email field a user selected |
|
327 | if ($recipient->SendEmailFromField()) { |
|
328 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailFromField()->Name); |
|
329 | ||
330 | if ($submittedFormField && is_string($submittedFormField->Value)) { |
|
331 | $email->setReplyTo($submittedFormField->Value); |
|
332 | } |
|
333 | } |
|
334 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
335 | if ($recipient->SendEmailToField()) { |
|
336 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
@@ 335-341 (lines=7) @@ | ||
332 | } |
|
333 | } |
|
334 | // check to see if they are a dynamic reciever eg based on a dropdown field a user selected |
|
335 | if ($recipient->SendEmailToField()) { |
|
336 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name); |
|
337 | ||
338 | if ($submittedFormField && is_string($submittedFormField->Value)) { |
|
339 | $email->setTo($submittedFormField->Value); |
|
340 | } |
|
341 | } |
|
342 | ||
343 | // check to see if there is a dynamic subject |
|
344 | if ($recipient->SendEmailSubjectField()) { |
|
@@ 344-350 (lines=7) @@ | ||
341 | } |
|
342 | ||
343 | // check to see if there is a dynamic subject |
|
344 | if ($recipient->SendEmailSubjectField()) { |
|
345 | $submittedFormField = $submittedFields->find('Name', $recipient->SendEmailSubjectField()->Name); |
|
346 | ||
347 | if ($submittedFormField && trim($submittedFormField->Value)) { |
|
348 | $email->setSubject($submittedFormField->Value); |
|
349 | } |
|
350 | } |
|
351 | ||
352 | $this->extend('updateEmail', $email, $recipient, $emailData); |
|
353 |