Build the message.

@return $this
435694
public function build()
    {
        $subjectKey = 'user.emails.email_confirmation.subject';

        return $this->subject($this->getSubject($subjectKey))
            ->to($this->petition->new_email)
            ->view('emails.newEmailConfirmation', [
                'name' => Auth::user()->fullName,
                'route' => $this->route(),
        ]);
    }
1237828
public function build()
    {
        if (isset($this->attribute['href']) && (! isset($this->attribute['alt']))) {
            $this->attribute['alt'] = $this->attribute['href'];
        }

        return parent::build();
    }
593902
public function create(): self
    {
        $this->payload = null;
        $this->aad = null;
        $this->recipients = [];
        $this->sharedProtectedHeader = [];
        $this->sharedHeader = [];
        $this->compressionMethod = null;
        $this->contentEncryptionAlgorithm = null;
        $this->keyManagementMode = null;

        return $this;
    }
385059
public function send()
    {
        if ($this->message === null) {
            throw new Exception(
                'No message set. You have to set one with Message::setMessage()'
                . ' or use Notification::sendMessage(title, msg) instead.'
            );
        }

        $this->notify($this->title, $this->message, realpath($this->icon));

        return $this;
    }
493527
protected function buildAttachments($message)
    {
        foreach ($this->attachments as $attachment) {
            $message->attach($attachment['file'], $attachment['options']);
        }

        foreach ($this->rawAttachments as $attachment) {
            $message->attachData(
                $attachment['data'], $attachment['name'], $attachment['options']
            );
        }

        $this->buildDiskAttachments($message);

        return $this;
    }
262024
public function toMessage()
    {
        $m = new Message(array(
            $this->getRequestId(),
            $this->getActionName(),
        ));
        $m->append($this->getParameters());

        return $m;
    }
408594
protected function build()
    {
        $mail = clone $this;
        $mail->setHeader('Message-ID', $this->getRandomId());

        $cursor = $mail;
        if ($mail->attachments) {
            $tmp = $cursor->setContentType('multipart/mixed');
            $cursor = $cursor->addPart();
            foreach ($mail->attachments as $value) {
                $tmp->addPart($value);
            }
        }

        if ($mail->htmlBody !== '') {
            $tmp = $cursor->setContentType('multipart/alternative');
            $cursor = $cursor->addPart();
            $alt = $tmp->addPart();
            if ($mail->inlines) {
                $tmp = $alt->setContentType('multipart/related');
                $alt = $alt->addPart();
                foreach ($mail->inlines as $value) {
                    $tmp->addPart($value);
                }
            }
            $alt->setContentType('text/html', 'UTF-8')
                ->setEncoding(\preg_match('#[^\n]{990}#', $mail->htmlBody)
                    ? self::ENCODING_QUOTED_PRINTABLE
                    : (\preg_match('#[\x80-\xFF]#', $mail->htmlBody) ? self::ENCODING_8BIT : self::ENCODING_7BIT))
                ->setBody($mail->htmlBody);
        }

        $text = $mail->getBody();
        $mail->setBody('');
        $cursor->setContentType('text/plain', 'UTF-8')
            ->setEncoding(\preg_match('#[^\n]{990}#', $text)
                ? self::ENCODING_QUOTED_PRINTABLE
                : (\preg_match('#[\x80-\xFF]#', $text) ? self::ENCODING_8BIT : self::ENCODING_7BIT))
            ->setBody($text);

        return $mail;
    }
1151928
public function build()
    {
        if ($this->getContext()) {
            $context = $this->getContext();
        } else {
            $context = new Array2ObjectContext();
        }

        $this->prepareContext($context);

        return new Array2Object($context);
    }
1047059
public function current()
    {
        if(!isset($this->messages[$this->position])){
            $this->messages[$this->position] = new Message($this->data['messages'][$this->position]);
        }

        return $this->messages[$this->position];
    }
1124922
public function buildMessage()
    {
        if (!empty($this->message)) {
            return $this->message;
        }

        $video = [
            'type' => MessageType::VIDEO,
            'originalContentUrl' => $this->originalContentUrl,
            'previewImageUrl' => $this->previewImageUrl,
        ];

        if ($this->quickReply) {
            $video['quickReply'] = $this->quickReply->buildQuickReply();
        }

        $this->message[] = $video;

        return $this->message;
    }
950340
public function setMessage($message)
    {
        if ( ! is_null($message)) $message = (string) $message;

        $this->setAttribute('message', $message);

        return $this;
    }
1053560
public function addMessage(Message $message): Email
    {
        if (null === $this->message->getBody()) {
            $this->message->setBody($message->getBody(), $message->getContentType());

            return $this;
        }

        $this->message->addPart($message->getBody(), $message->getContentType());

        return $this;
    }
363834
protected function buildErrors()
    {
        if ($this->hasErrors()) {
            echo implode(PHP_EOL, $this->getErrors());
            echo PHP_EOL, $this->opts->getUsageMessage();
        }

        return $this;
    }
316858
public function buildMessage()
    {
        if (!empty($this->message)) {
            return $this->message;
        }

        $locationMessage = [
            'type' => MessageType::LOCATION,
            'title' => $this->title,
            'address' => $this->address,
            'latitude' => $this->latitude,
            'longitude' => $this->longitude,
        ];

        if ($this->quickReply) {
            $locationMessage['quickReply'] = $this->quickReply->buildQuickReply();
        }

        $this->message[] = $locationMessage;

        return $this->message;
    }
144349
public function prepare() {
        $this->inlineCode = $this->buildInlineCode();
        $this->addGlobalCode($this->buildGlobalCode());
        return $this;
    }
1050670
public function build()
    {
        foreach ($this->child as $element) {
            $element->build();
            $this->node->appendChild($element->getNode());
        }

        return $this;
    }
342121
public function buildMessage()
    {
        if (!empty($this->message)) {
            return $this->message;
        }

        $imageMessage = [
            'type' => MessageType::IMAGE,
            'originalContentUrl' => $this->originalContentUrl,
            'previewImageUrl' => $this->previewImageUrl,
        ];

        if ($this->quickReply) {
            $imageMessage['quickReply'] = $this->quickReply->buildQuickReply();
        }

        $this->message[] = $imageMessage;

        return $this->message;
    }