PHP 8.3.31
Preview: SentMessage.php Size: 2.02 KB
/home/getspomw/royalsquad.us/vendor/symfony/mailer/SentMessage.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Mailer;

use Symfony\Component\Mime\Message;
use Symfony\Component\Mime\RawMessage;

/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
class SentMessage
{
    private RawMessage $original;
    private RawMessage $raw;
    private string $messageId;
    private string $debug = '';

    /**
     * @internal
     */
    public function __construct(
        RawMessage $message,
        private Envelope $envelope,
    ) {
        $message->ensureValidity();

        $this->original = $message;

        if ($message instanceof Message) {
            $message = clone $message;
            $headers = $message->getHeaders();
            if (!$headers->has('Message-ID')) {
                $headers->addIdHeader('Message-ID', $message->generateMessageId());
            }
            $this->messageId = $headers->get('Message-ID')->getId();
            $this->raw = new RawMessage($message->toIterable());
        } else {
            $this->raw = $message;
        }
    }

    public function getMessage(): RawMessage
    {
        return $this->raw;
    }

    public function getOriginalMessage(): RawMessage
    {
        return $this->original;
    }

    public function getEnvelope(): Envelope
    {
        return $this->envelope;
    }

    public function setMessageId(string $id): void
    {
        $this->messageId = $id;
    }

    public function getMessageId(): string
    {
        return $this->messageId;
    }

    public function getDebug(): string
    {
        return $this->debug;
    }

    public function appendDebug(string $debug): void
    {
        $this->debug .= $debug;
    }

    public function toString(): string
    {
        return $this->raw->toString();
    }

    public function toIterable(): iterable
    {
        return $this->raw->toIterable();
    }
}

Directory Contents

Dirs: 9 × Files: 11

Name Size Perms Modified Actions
Command DIR
- drwxrwxrwx 2025-09-17 06:53:22
Edit Download
- drwxrwxrwx 2026-04-22 01:40:04
Edit Download
Event DIR
- drwxrwxrwx 2026-04-21 10:56:34
Edit Download
- drwxrwxrwx 2026-04-21 17:33:38
Edit Download
Exception DIR
- drwxrwxrwx 2026-04-19 15:12:53
Edit Download
Header DIR
- drwxrwxrwx 2026-04-21 10:02:11
Edit Download
Messenger DIR
- drwxrwxrwx 2025-09-17 06:53:22
Edit Download
Test DIR
- drwxrwxrwx 2026-04-19 15:13:45
Edit Download
Transport DIR
- drwxrwxrwx 2026-04-21 09:23:47
Edit Download
4.08 KB lrw-rw-rw- 2025-09-17 06:53:22
Edit Download
1.29 KB lrw-rw-rw- 2025-09-17 06:53:22
Edit Download
2.36 KB lrw-rw-rw- 2025-09-17 06:53:22
Edit Download
3.55 KB lrw-rw-rw- 2025-09-17 06:53:22
Edit Download
3.86 KB lrw-r--r-- 2026-04-26 10:04:25
Edit Download
1.04 KB lrw-rw-rw- 2025-09-17 06:53:22
Edit Download
2.63 KB lrw-rw-rw- 2025-09-17 06:53:22
Edit Download
768 B lrw-rw-rw- 2025-09-17 06:53:22
Edit Download
2.46 KB lrw-rw-rw- 2025-09-17 06:53:22
Edit Download
2.02 KB lrw-rw-rw- 2025-09-17 06:53:22
Edit Download
7.64 KB lrw-rw-rw- 2025-09-17 06:53:22
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).