Since you came here, you are properly holding a piece of HTML from a message which contains an embedded image.
An example could be this HTML snippet:
<img alt="" src="cid:part1.02030103.04080406@home.nl" height="375" width="300">
Notice the src attribute value:
cid:part1.02030103.04080406@home.nl
You should notice that the protocol specifier is not HTTP but is instead
cid. This stands for
Content-
ID.
So the src attribute
cid:part1.02030103.04080406@home.nl is specifying that the image is embedded in the email, and the part you should look for has a Content-ID of
part1.02030103.04080406@home.nl.
This means that such a part should exist in the email, and it might look like this:
Content-Type: image/jpeg; name="image.jpg"
Content-Transfer-Encoding: base64
Content-ID: <part1.02030103.04080406@home.nl>
Content-Disposition: inline;
filename="image.jpg"
/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAQDAwQDAwQEBAQFBQQFBwsHBwYGBw4KCggLEA4R
Notice that the Content-ID of the part is equal to the src attribute of the image.
Therefore, to extract an image you need to to find the MessagePart with the correct Content-ID.
When you have that Messagepart, you can save it to disk using the Save method.