diff --git a/app/Console/Commands/MailList.php b/app/Console/Commands/MailList.php index 46cba6d..4026bc3 100644 --- a/app/Console/Commands/MailList.php +++ b/app/Console/Commands/MailList.php @@ -30,7 +30,13 @@ class MailList extends Command */ public function handle() { - $ao = Address::findFTN($this->argument('ftn')); + $ao = Address::findFTN($this->argument('ftn'),TRUE); + + if (! $ao) { + $this->error(sprintf('%s not found?',$this->argument('ftn'))); + + return self::FAILURE; + } $this->info('Netmail'); $this->table([ @@ -68,6 +74,6 @@ class MailList extends Command ]; })); - return Command::SUCCESS; + return self::SUCCESS; } } \ No newline at end of file