API / Minn\Mail / Transfer

Transfer final class

Minn\Mail\Transfer · public/minn/src/Minn/Mail/Transfer.php · 61 lines

Body text in a content transfer encoding, and the line-ending helpers mail composition leans on.

Constants and properties

constMAX_LINE = 998

Public

staticencode(string $text, string $encoding, string $eol): string#

The text in an encoding: 7bit, 8bit and binary keep the text (the first two with normalized line breaks and a final one), base64 in 76-column lines, quoted-printable by PHP's encoder.

staticquotedPrintable(string $text, string $eol): string#

Quoted-printable text with the encoder's line breaks normalized.

staticnormalizeBreaks(string $text, string $eol = ' '): string#

Every CRLF, CR or LF as $eol.

staticstripTrailingSpace(string $text): string#

The text without trailing spaces, tabs and line breaks.

staticstripTrailingBreaks(string $text): string#

The text without trailing line breaks.

statichas8bit(string $text): bool#

Whether any byte is outside 7-bit ASCII.

statichasLongLine(string $text): bool#

Whether any line runs past the 998 characters SMTP allows.