| @@ 212-231 (lines=20) @@ | ||
| 209 | if ($recruiter->getSettings('Applications')->getMailAccess()) { |
|
| 210 | $this->mailer('Applications/NewApplication', array('job' => $job, 'user' => $recruiter, 'admin' => $admin), /*send*/ true); |
|
| 211 | } |
|
| 212 | if ($recruiter->getSettings('Applications')->getAutoConfirmMail()) { |
|
| 213 | $ackBody = $recruiter->getSettings('Applications')->getMailConfirmationText(); |
|
| 214 | if (empty($ackBody)) { |
|
| 215 | $ackBody = $job->user->getSettings('Applications')->getMailConfirmationText(); |
|
| 216 | } |
|
| 217 | if (!empty($ackBody)) { |
|
| 218 | /* Acknowledge mail to the applicant */ |
|
| 219 | $ackMail = $this->mailer( |
|
| 220 | 'Applications/Confirmation', |
|
| 221 | array('application' => $applicationEntity, |
|
| 222 | 'body' => $ackBody, |
|
| 223 | ) |
|
| 224 | ); |
|
| 225 | // Must be called after initializers in creation |
|
| 226 | $ackMail->setSubject(/*@translate*/ 'Application confirmation'); |
|
| 227 | $ackMail->setFrom($recruiter->getInfo()->getEmail()); |
|
| 228 | $this->mailer($ackMail); |
|
| 229 | $applicationEntity->changeStatus(StatusInterface::CONFIRMED, sprintf('Mail was sent to %s', $applicationEntity->contact->email)); |
|
| 230 | } |
|
| 231 | } |
|
| 232 | ||
| 233 | // send carbon copy of the application |
|
| 234 | ||
| @@ 352-371 (lines=20) @@ | ||
| 349 | if ($settings->getMailAccess()) { |
|
| 350 | $this->mailer('Applications/NewApplication', array('job' => $job, 'user' => $recruiter, 'admin' => $admin), /*send*/ true); |
|
| 351 | } |
|
| 352 | if ($settings->getAutoConfirmMail()) { |
|
| 353 | $ackBody = $settings->getMailConfirmationText(); |
|
| 354 | if (empty($ackBody)) { |
|
| 355 | $ackBody = $job->user->getSettings('Applications')->getMailConfirmationText(); |
|
| 356 | } |
|
| 357 | if (!empty($ackBody)) { |
|
| 358 | /* Acknowledge mail to applier */ |
|
| 359 | $ackMail = $this->mailer( |
|
| 360 | 'Applications/Confirmation', |
|
| 361 | array('application' => $application, |
|
| 362 | 'body' => $ackBody, |
|
| 363 | ) |
|
| 364 | ); |
|
| 365 | // Must be called after initializers in creation |
|
| 366 | $ackMail->setSubject(/*@translate*/ 'Application confirmation'); |
|
| 367 | $ackMail->setFrom($recruiter->getInfo()->getEmail()); |
|
| 368 | $this->mailer($ackMail); |
|
| 369 | $application->changeStatus(StatusInterface::CONFIRMED, sprintf('Mail was sent to %s', $application->contact->email)); |
|
| 370 | } |
|
| 371 | } |
|
| 372 | ||
| 373 | } |
|
| 374 | ||