You will need to use content-type "text/html" for the whole e-mail or some of its
parts in case of multi-part e-mail. CSS can be embedded exactly as in stand-along HTML.
Embedding an image is more tricky. You need to create a multi-part e-mail. Let's say, one part is the image, which has "Content-Disposition" other than inline ("attachment"). Its "Content-type" could be, say, "image/png" or any other image content type, depending on what it really is. Now, you need to reference this image in your HTML part. This is done using the special
URI sheme "cid:".
Please see my past answers:
Sending HTML attachment with images[
^],
How to attach a file in smtp mail implementation[
^],
how can i send image with text in email in asp[
^].
—SA