How to create an HTML MIME with embedded images

  • Thread starter Thread starter John Mark Howell
  • Start date Start date
J

John Mark Howell

Sorry for the cross postings, but I'm getting nowhere.

Does anyone know how to create a MIME for an HTML email that contains
images? I can create the MIME body parts, but I don't know how to get the
HTML to point to the image parts.
JMH.
 
John Mark Howell said:
Sorry for the cross postings, but I'm getting nowhere.

Does anyone know how to create a MIME for an HTML email that contains
images? I can create the MIME body parts, but I don't know how to
get the HTML to point to the image parts.
JMH.

Why would you want to mess with the MIME portions of a message? Let the
mail agent do it. See this for info on writing HTML mesages:
http://www.slipstick.com/mail1/html.htm
 
Correct me if I'm wrong, but you're referring to using CDO which can be
installed with Outlook (CDO is no longer available as a separate
distribution).
If so, then Outlook would be on the machine and I would much prefer using
that. All I have is POP3 and SMTP access via TCP/IP w/ SSL.
I'm hoping you come back and tell me that there is something released with
every copy of XP that I can use.
 
John Mark Howell said:
Correct me if I'm wrong, but you're referring to using CDO which can
be installed with Outlook (CDO is no longer available as a separate
distribution).

You're wrong.
If so, then Outlook would be on the machine and I would much prefer
using that. All I have is POP3 and SMTP access via TCP/IP w/ SSL.
I'm hoping you come back and tell me that there is something released
with every copy of XP that I can use.

Your question is obviously not an Outlook question, so you're better off in
a Windows programming newsgroup.
 
Take a look at System.Web.Mail, which wraps CDOSYS. This looks like a good place to start -- http://www.systemwebmail.com/

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Your mail structure should look like this:
-multipart/related
+mulitipart/alternative
*text/plain
*text/html
+image.gif (content-id: sampleID)

You should "cid:"'s as src of images:
<img href="cid:sampleID" />

content-id header of the imege mime object shoud be set to apropriate
ID:
content-id: sampleID

Or you can use this component:
http://www.lesnikowski.com/mail
 
Back
Top