lib/Mailer/SendGrid.php
private function formatRecipients($recipients)
    {
        $data = [];
        foreach ($this->normalizeIdentities($recipients) as $recipient) {
            $item = [
                'email' => $recipient->getEmail(),
                'name'  => $recipient->getName(),
            ];

            if (empty($item['name'])) {
                unset($item['name']);
            }

            $data[] = $item;
        }

        return $data;
    }
private function formatRecipients($recipients)
    {
        $data = [];
        foreach ($this->normalizeIdentities($recipients) as $recipient) {
            $item = [
                'email' => $recipient->getEmail(),
                'name'  => $recipient->getName(),
            ];

            if (empty($item['name'])) {
                unset($item['name']);
            }

            $data[] = $item;
        }

        return $data;
    }
@param IdentityInterface[]|string $recipients

@return array