PHPMailer\PHPMailer
PHPMailer::getBoundary
Return the start of a message boundary.
Метод класса: PHPMailer{}
Хуков нет.
Возвращает
Строку.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->getBoundary( $boundary, $charSet, $contentType, $encoding );
- $boundary(строка) (обязательный)
- .
- $charSet(строка) (обязательный)
- .
- $contentType(строка) (обязательный)
- .
- $encoding(строка) (обязательный)
- .
Код PHPMailer::getBoundary() PHPMailer::getBoundary WP 7.0
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;
}