protected function callMessageBuilder($callback, MessageContract $message)
    {
        if ($callback instanceof Closure) {
            return $callback($message);
        }

        if ($this->container !== null) {
            return $this->getInvoker()->call($callback)->mail($message);
        }

        throw new InvalidArgumentException('Callback is not valid.');
    }
protected function callMessageBuilder($callback, MessageContract $message)
    {
        if ($callback instanceof Closure) {
            return $callback($message);
        }

        if ($this->container !== null) {
            return $this->getInvoker()->call($callback)->mail($message);
        }

        throw new InvalidArgumentException('Callback is not valid.');
    }
protected function callMessageBuilder ( $ callback , MessageContract $ message ) { if ( $ callback instanceof Closure ) { return $ callback ( $ message ) ; } if ( $ this -> container !== null ) { return $ this -> getInvoker ( ) -> call ( $ callback ) -> mail ( $ message ) ; } throw new InvalidArgumentException ( 'Callback is not valid.' ) ; }
Call the provided message builder.

@param null|\Closure|string                     $callback
@param \Viserio\Component\Contract\Mail\Message $message

@throws \InvalidArgumentException

@return mixed
Call the provided message builder .