public function sendConfirmationEmailMessage(User $user)
 {
     $template = $this->parameters['template']['confirmation'];
     $url = 'some url';
     //$this->router->generate('fos_user_registration_confirm', array('token' => $user->getConfirmationToken()), true);
     $context = array('user' => $user, 'confirmationUrl' => $url);
     $this->sendMessage($template, $context, $this->parameters['from_email']['confirmation'], $user->getEmail());
 }
 public function sendAdvCopyEmailMessage(User $client)
 {
     $ria = $client->getProfile()->getRia();
     $companyInformation = $ria->getRiaCompanyInformation();
     $template = $this->parameters['template']['adv_copy'];
     $context = array('client' => $client->getUsername(), 'company' => $companyInformation->getName());
     $extension = pathinfo($companyInformation->getAdvCopy(), PATHINFO_EXTENSION);
     $attachments = array('ADV Copy.' . $extension => $companyInformation->getWebAdvCopy());
     $this->sendMessage($template, $context, $this->parameters['from_email']['adv_copy'], $client->getEmail(), $attachments);
 }
 /**
  * Get recipient email
  *
  * @return string
  */
 public function getEmail()
 {
     return $this->user->getEmail();
 }
 public function sendWelcomeMessage(User $client, $password)
 {
     $template = $this->parameters['template']['welcome'];
     $context = array('client' => $client, 'password' => $password, 'url' => $this->router->generate('rx_user_homepage', array(), true));
     $this->sendMessage($template, $context, $this->parameters['from_email']['welcome'], $client->getEmail());
 }
 public function sendCreatedAdminUserMessage(User $user, $pass, $level)
 {
     $template = $this->parameters['template']['created_user'];
     $context = array('user' => $user, 'pass' => $pass, 'level' => $level);
     $this->sendMessage($template, $context, $this->parameters['from_email']['created_user'], $user->getEmail());
 }
 public function sendClientRiaUploadedDocument(User $client)
 {
     $ria = $client->getRia();
     $template = $this->parameters['template']['client_ria_uploaded_document'];
     $fromEmail = $this->parameters['from_email']['client_ria_uploaded_document'];
     $context = array('client' => $client, 'ria' => $ria, 'logo' => $this->getRiaLogo($ria->getId()));
     $this->sendMessage($template, $fromEmail, $client->getEmail(), $context);
 }