setDescription('Sends an email to a given address to test mail-server configuration') ->addArgument('email', InputArgument::REQUIRED, 'An email where to send the test email'); } protected function doExecute(InputInterface $input, OutputInterface $output) { $this->container['notification.deliverer']->deliver( Mail::create($this->container, new Receiver(null, $input->getArgument('email'))) ); return 0; } }