protected function createMessage(): MessageContract
    {
        $message = new Message($this->swift->createMessage());

        // If a global from address has been specified we will set it on every message
        // instances so the developer does not have to repeat themselves every time
        // they create a new message. We will just go ahead and push the address.
        if (isset($this->from['address'])) {
            $message->from($this->from['address'], $this->from['name']);
        }

        // When a global reply address was specified we will set this on every message
        // instance so the developer does not have to repeat themselves every time
        // they create a new message. We will just go ahead and push this address.
        if (! empty($this->replyTo['address'])) {
            $message->replyTo($this->replyTo['address'], $this->replyTo['name']);
        }

        return $message;
    }
protected function createMessage(): MessageContract
    {
        $message = new Message($this->swift->createMessage());

        // If a global from address has been specified we will set it on every message
        // instances so the developer does not have to repeat themselves every time
        // they create a new message. We will just go ahead and push the address.
        if (isset($this->from['address'])) {
            $message->from($this->from['address'], $this->from['name']);
        }

        // When a global reply address was specified we will set this on every message
        // instance so the developer does not have to repeat themselves every time
        // they create a new message. We will just go ahead and push this address.
        if (! empty($this->replyTo['address'])) {
            $message->replyTo($this->replyTo['address'], $this->replyTo['name']);
        }

        return $message;
    }
protected function createMessage ( ) : MessageContract { $ message = new Message ( $ this -> swift -> createMessage ( ) ) ; // If a global from address has been specified we will set it on every message // instances so the developer does not have to repeat themselves every time // they create a new message. We will just go ahead and push the address. if ( isset ( $ this -> from [ 'address' ] ) ) { $ message -> from ( $ this -> from [ 'address' ] , $ this -> from [ 'name' ] ) ; } // When a global reply address was specified we will set this on every message // instance so the developer does not have to repeat themselves every time // they create a new message. We will just go ahead and push this address. if ( ! empty ( $ this -> replyTo [ 'address' ] ) ) { $ message -> replyTo ( $ this -> replyTo [ 'address' ] , $ this -> replyTo [ 'name' ] ) ; } return $ message ; }
Create a new message instance.

@return \Viserio\Component\Contract\Mail\Message
Create a new message instance .