/** * @throws Exception * * @return bool */ public function send() : bool { if (!$this->getTo() && !$this->getCc() && !$this->getBcc()) { throw new Exception('Cannot send message without a destination address'); } $return = $this->mailer->send($this->message) > 0 ? true : false; self::$listener->sendLog(); return $return; }