PHPMailer\PHPMailer

PHPMailer::getBoundary()protectedWP 1.0

Return the start of a message boundary.

Метод класса: PHPMailer{}

Хуков нет.

Возвращает

Строку.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->getBoundary( $boundary, $charSet, $contentType, $encoding );
$boundary(строка) (обязательный)
-
$charSet(строка) (обязательный)
-
$contentType(строка) (обязательный)
-
$encoding(строка) (обязательный)
-

Код PHPMailer::getBoundary() WP 6.5.2

protected function getBoundary($boundary, $charSet, $contentType, $encoding)
{
    $result = '';
    if ('' === $charSet) {
        $charSet = $this->CharSet;
    }
    if ('' === $contentType) {
        $contentType = $this->ContentType;
    }
    if ('' === $encoding) {
        $encoding = $this->Encoding;
    }
    $result .= $this->textLine('--' . $boundary);
    $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet);
    $result .= static::$LE;
    //RFC1341 part 5 says 7bit is assumed if not specified
    if (static::ENCODING_7BIT !== $encoding) {
        $result .= $this->headerLine('Content-Transfer-Encoding', $encoding);
    }
    $result .= static::$LE;

    return $result;
}