src/Viserio/Component/Profiler/DataCollector/Bridge/SwiftMailDataCollector.php
public function collect(ServerRequestInterface $serverRequest, ResponseInterface $response): void
    {
        $mails = [];

        foreach ($this->messagesLogger->getMessages() as $message) {
            $mails[] = [
                'to'      => $this->formatTo($message->getTo()),
                'subject' => $message->getSubject(),
                'headers' => $message->getHeaders()->toString(),
            ];
        }

        $this->data = [
            'count' => \count($mails),
            'mails' => $mails,
        ];
    }
public function collect(ServerRequestInterface $serverRequest, ResponseInterface $response): void
    {
        $mails = [];

        foreach ($this->messagesLogger->getMessages() as $message) {
            $mails[] = [
                'to'      => $this->formatTo($message->getTo()),
                'subject' => $message->getSubject(),
                'headers' => $message->getHeaders()->toString(),
            ];
        }

        $this->data = [
            'count' => \count($mails),
            'mails' => $mails,
        ];
    }
{@inheritdoc}