$values[] =
$this->
preparePart($fieldName,
$item);
};
array_walk($fields,
$prepare);
return $values;
} private function preparePart(string
$name, string|TextPart
$value): TextPart
{ if (\
is_string($value)) { return $this->
configurePart($name,
new TextPart($value, 'utf-8', 'plain', '8bit'
));
} return $this->
configurePart($name,
$value);
} private function configurePart(string
$name, TextPart
$part): TextPart
{ static $r;
$r ??=
new \
ReflectionProperty(TextPart::
class, 'encoding'
);