mirror of
https://github.com/anonaddy/anonaddy
synced 2026-04-26 01:25:06 +02:00
26 lines
603 B
PHP
26 lines
603 B
PHP
<?php
|
|
|
|
namespace App\CustomMailDriver\Mime\Encoder;
|
|
|
|
use Symfony\Component\Mime\Encoder\ContentEncoderInterface;
|
|
|
|
final class RawContentEncoder implements ContentEncoderInterface
|
|
{
|
|
public function encodeByteStream($stream, int $maxLineLength = 0): iterable
|
|
{
|
|
while (!feof($stream)) {
|
|
yield fread($stream, 8192);
|
|
}
|
|
}
|
|
|
|
public function getName(): string
|
|
{
|
|
return 'raw';
|
|
}
|
|
|
|
public function encodeString(string $string, ?string $charset = 'utf-8', int $firstLineOffset = 0, int $maxLineLength = 0): string
|
|
{
|
|
return $string;
|
|
}
|
|
}
|