/** * Builds and send the email message to the employee * * @param string $employee * @param string $sender * @param string $month * @return boolean true on success * @author Fran Iglesias */ private function sendEmail(Employee $employee, $sender, $paths, PayrollMonth $month) { $message = new MailMessage(); $message->setTo($employee->getEmail())->setSender($sender)->setTemplate($this->template, array('employee' => $employee, 'month' => $month))->attach($this->getPayrollDocuments($employee, $paths, $month)); return $this->mailer->send($message); }
private function sendEmail($event) { $message = new MailMessage(); $message->setTo($this->recipient)->setSender($this->sender)->setTemplate($this->template, $this->prepareTemplateParameters($event)); return $this->mailer->send($message); }