EDIT 2:
Try first without the simple text version:
Content-Type: multipart/related;
boundary="----=_NextPart_000_0009_01CEC44B.4C788080"
When this shows the image then try the following and putting the elements into an alternative part like this:
Subject: ...
From: ...
To: ...
Content-Type: multipart/related;
type="multipart/alternative";
boundary="----=_NextPart_000_0009_01CEC44B.4C788080"
------=_NextPart_000_0009_01CEC44B.4C788080
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_000A_01CEC44B.4C788080"
------=_NextPart_001_000A_01CEC44B.4C788080
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable
My Simple text
------=_NextPart_001_000A_01CEC44B.4C788080
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable
My HTML Text
------=_NextPart_001_000A_01CEC44B.4C788080--
------=_NextPart_000_0009_01CEC44B.4C788080
Content-Type: image/png;
name="caddiigg.png"
Content-Transfer-Encoding: base64
Content-ID: <38F81D2D49CB42B2AD8F93F5CF01BCA1@SKNB>
iVBORw0KGgoAAAANSUhEUgAAAxcAAAH0CAIAAADADUduAAAgAElEQVR4nEy8adP02H3ex0+TFymZ
5JAzw01OpazZOVS2SjkvYpHzzELasiuOK4tLkhVJMcWZu7E0loN96x07cPZzsPR2P8+QlPOh8gL9
DFn1L
------=_NextPart_000_0009_01CEC44B.4C788080--
At the moment the sourcecode shows an email like this:
Content-Type: multipart/mixed; boundary="===============0661849094=="
MIME-Version: 1.0
Subject: image test message
From:
To:
--===============0661849094==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
This is sample text from me
--===============0661849094==
Content-Type: text/html; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
<html>
<head>
<title> this is a test title </title>
</head>
<body>
<p> Test me <br>
Another line <br>
This is the image you were looking for <img src="cid:test_image"><br>
This will teach you not to click on links in strange <a href="http://purple.com">emails</a>
</p>
</body>
</html>
--===============0661849094==
Content-Type: image/jpeg
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Id: <test_image>
YmxhYmxh
--===============0661849094==--
EDIT 1:
This is what an Email looks like that works:
...
<BR><IMG alt=3D""=20
src=3D"cid:38F81D2D49CB42B2AD8F93F5CF01BCA1@SKNB">
...
------=_NextPart_000_0009_01CEC44B.4C788080
Content-Type: image/png;
name="caddiigg.png"
Content-Transfer-Encoding: base64
Content-ID: <38F81D2D49CB42B2AD8F93F5CF01BCA1@SKNB>
iVBORw0KGgoAAAANSUhEUg ....
I see a difference: Content-ID
- an uppercase D