Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cdonts: preview mhtml (attachurl enclosed)

Status
Not open for further replies.

sharedworld

Programmer
Dec 25, 2003
65
US
Hello, I have to generate a file in the MHTML format (to be read in microsoft word with pictures included in the document offline).

The best way I founded at this time is cdonts, with attachurl, which allows me to attachurl in the mail so the mail is in mhtml format with my pictures included.

But how can I read the "mail" in the html format before to be sent, i don't need it to be sent i just need the mhtml... with the images in the special mhtml format...

here is my code (but i don't it to be sent, i just xant a preview with the pictures attached...)

Set myMail = CreateObject("CDONTS.NewMail")

HTML = &quot;<!DOCTYPE HTML PUBLIC &quot;&quot;-//IETF//DTD HTML//EN&quot;&quot;>&quot; & NL
HTML = HTML & &quot;<html>&quot;
HTML = HTML & &quot;<head>&quot;
HTML = HTML & &quot;<meta http-equiv=&quot;&quot;Content-Type&quot;&quot;&quot;
HTML = HTML & &quot;content=&quot;&quot;text/html; charset=iso-8859-1&quot;&quot;>&quot;
HTML = HTML & &quot;<meta name=&quot;&quot;GENERATOR&quot;&quot; content=&quot;&quot;Microsoft FrontPage 2.0&quot;&quot;>&quot;
HTML = HTML & &quot;<title>Exchange CDO Example</title>&quot;
HTML = HTML & &quot;</head>&quot;
HTML = HTML & &quot;<body bgcolor=&quot;&quot;#FFFFFF&quot;&quot;>&quot;
HTML = HTML & &quot;<p><font size=&quot;&quot;6&quot;&quot; face=&quot;&quot;Arial Black&quot;&quot;><strong>Exchange CDO &quot;
HTML = HTML & &quot;Sample<img src=CDO.jpg>&quot;
HTML = HTML & &quot;</strong></font></p>&quot;
HTML = HTML & &quot;<p>CDO for NTS allows an easy way to send mail.&quot;
HTML = HTML & &quot;This example shows how the content can be an HTML page&quot;
HTML = HTML & &quot;which allows you to send rich text and inline graphics.</p>&quot;
HTML = HTML & &quot;</body>&quot;
HTML = HTML & &quot;</html>&quot;

myMail.AttachURL server.mappath(&quot;pics/1044.jpg&quot;), &quot;CDO.jpg&quot;
myMail.From = &quot;test1@test1.com&quot;
myMail.To = &quot;test1@test1.com&quot;
myMail.Subject = &quot;Sample Message&quot;
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top