public function getResolverForPart(EmailPart $part): EmailPartResolver
    {
        $identifier = get_class($part);

        if (!array_key_exists($identifier, $this->resolvers)) {
            throw new InvalidArgumentException(sprintf(
                'Resolver for the part "%s" does not exists. Please choose one of the following: %s',
                $identifier,
                implode(', ', array_keys($this->resolvers))
            ));
        }

        return $this->resolvers[$identifier];
    }