Listener/RegistrationListener.php
public function emailOnRegistration(FilterUserResponseEvent $event)
    {
        $template = '@XMSecurity/Mail/user_registered.html.twig';
        $mailParams = [
            'user' => $event->getUser(),
        ];

        $this->mailManager->getSender()
            ->setTemplate($template, $mailParams)
            ->send($this->adminEmail);
    }
public function emailOnRegistration(FilterUserResponseEvent $event)
    {
        $template = '@XMSecurity/Mail/user_registered.html.twig';
        $mailParams = [
            'user' => $event->getUser(),
        ];

        $this->mailManager->getSender()
            ->setTemplate($template, $mailParams)
            ->send($this->adminEmail);
    }
public function emailOnRegistration ( FilterUserResponseEvent $ event ) { $ template = '@XMSecurity/Mail/user_registered.html.twig' ; $ mailParams = [ 'user' => $ event -> getUser ( ) , ] ; $ this -> mailManager -> getSender ( ) -> setTemplate ( $ template , $ mailParams ) -> send ( $ this -> adminEmail ) ; }
Emails the admin regarding the registration.

@param  FilterUserResponseEvent $event
Emails the admin regarding the registration .