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