private function getAddressesFromFieldInPart($field, Part $part)
    {
        $addresses = [];

        $headers = $part->getHeaders();
        if (empty($headers)) {
            return $addresses;
        }

        if (!$headers->has($field)) {
            return $addresses;
        }

        /** @var AbstractAddressList $addressList */
        $addressList = null;

        try {
            $addressList = $part->getHeader($field);
        } catch (InvalidArgumentException $e) {
            return $addresses;
        }

        if (!$addressList instanceof AbstractAddressList) {
            return $addresses;
        }

        foreach ($addressList->getAddressList() as $address) {
            $addresses[] = strtolower($address->getEmail());
        }

        return $addresses;
    }