Example #1
0
 /**
  *
  */
 public function proceedMail()
 {
     $siteName = $this->options->getSiteName();
     $url = $this->getUrlPlugin();
     $user = $this->getUser();
     if (isset($user)) {
         $confirmationLink = $url->fromRoute('lang/register-confirmation', array('userId' => $user->getId()), array('force_canonical' => true));
         $userEmail = $user->getInfo()->getEmail();
         $userName = $user->getInfo()->getDisplayName();
         $mailService = $this->getMailService();
         /* @var \Core\Mail\HTMLTemplateMessage $mail */
         $mail = $mailService->get('htmltemplate');
         $mail->user = $user;
         $mail->name = $userName;
         $mail->confirmationlink = $confirmationLink;
         $mail->siteName = $siteName;
         $mail->setTemplate('mail/register');
         $mail->setFormattedSubject('your registration on %s', $siteName);
         $mail->setTo($userEmail);
         $mailService->send($mail);
     }
 }
Example #2
0
 /**
  * @since 0.20
  */
 public function testThrowsExceptionIfSystemMessageEmailIsNotSet()
 {
     $this->setExpectedException('\\Core\\Options\\Exception\\MissingOptionException', 'Missing value for option "systemMessageEmail"');
     $this->options->getSystemMessageEmail();
 }