src/Viserio/Component/Mail/Transport/PostmarkTransport.php
protected function getMIMEPart(Swift_Mime_SimpleMessage $message, $mimeType): ?Swift_Mime_SimpleMimeEntity
    {
        foreach ($message->getChildren() as $part) {
            if (! ($part instanceof Swift_Mime_Attachment) && \mb_strpos($part->getContentType(), $mimeType) === 0) {
                return $part;
            }
        }

        return null;
    }
protected function getMIMEPart(Swift_Mime_SimpleMessage $message, $mimeType): ?Swift_Mime_SimpleMimeEntity
    {
        foreach ($message->getChildren() as $part) {
            if (! ($part instanceof Swift_Mime_Attachment) && \mb_strpos($part->getContentType(), $mimeType) === 0) {
                return $part;
            }
        }

        return null;
    }
Gets MIME parts that match the message type.
Excludes parts of type \Swift_Mime_Attachment as those
are handled later.

@param \Swift_Mime_SimpleMessage $message
@param string                    $mimeType

@return null|\Swift_Mime_SimpleMimeEntity