code: public function beforeSend($message)
      {
          $event = new MailEvent(['message' => $message]);
          $this->trigger(self::EVENT_BEFORE_SEND, $event);
  
          return $event->isValid;
      }
docs: This method is invoked right before mail send.
  You may override this method to do last-minute preparation for the message.
  If you override this method, please make sure you call the parent implementation first.
  @param MessageInterface $message
  @return bool whether to continue sending an email.