iterableToString example

->subject('Testing')
            ->from('noreply@example.com')
            ->text('El Barto was not here');

        $message->getHeaders()->addIdHeader('Message-ID', 'some@id');

        $signer = new SMimeSigner($this->samplesDir.'sign.crt', $this->samplesDir.'sign.key');
        $signedMessage = $signer->sign($message);

        $restoredMessage = unserialize(serialize($signedMessage));

        self::assertSame($this->iterableToString($signedMessage->toIterable())$this->iterableToString($restoredMessage->toIterable()));
        self::assertSame($signedMessage->toString()$restoredMessage->toString());

        $this->assertMessageSignatureIsValid($restoredMessage$message);
    }

    public function testSignedMessageWithBcc()
    {
        $message = (new Email())
            ->date(new \DateTimeImmutable('2019-04-07 10:36:30', new \DateTimeZone('Europe/Paris')))
            ->to('fabien@symfony.com')
            ->addBcc('fabien@symfony.com', 's.stok@rollerscapes.net')
            
Home | Imprint | This part of the site doesn't use cookies.