protected function buildStringFromEmailAndNameArray(array $addresses): string
    {
        $results = [];
        foreach ($addresses as $emailAddress => $name) {
            if ($name !== '') {
                $results[] = sprintf('%s <%s>', $name, $emailAddress);
            } else {
                $results[] = $emailAddress;
            }
        }
        return implode(', ', $results);
    }