sharedworld
Programmer
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 = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=""Content-Type"""
HTML = HTML & "content=""text/html; charset=iso-8859-1"">"
HTML = HTML & "<meta name=""GENERATOR"" content=""Microsoft FrontPage 2.0"">"
HTML = HTML & "<title>Exchange CDO Example</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body bgcolor=""#FFFFFF"">"
HTML = HTML & "<p><font size=""6"" face=""Arial Black""><strong>Exchange CDO "
HTML = HTML & "Sample<img src=CDO.jpg>"
HTML = HTML & "</strong></font></p>"
HTML = HTML & "<p>CDO for NTS allows an easy way to send mail."
HTML = HTML & "This example shows how the content can be an HTML page"
HTML = HTML & "which allows you to send rich text and inline graphics.</p>"
HTML = HTML & "</body>"
HTML = HTML & "</html>"
myMail.AttachURL server.mappath("pics/1044.jpg"
, "CDO.jpg"
myMail.From = "test1@test1.com"
myMail.To = "test1@test1.com"
myMail.Subject = "Sample Message"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
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 = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=""Content-Type"""
HTML = HTML & "content=""text/html; charset=iso-8859-1"">"
HTML = HTML & "<meta name=""GENERATOR"" content=""Microsoft FrontPage 2.0"">"
HTML = HTML & "<title>Exchange CDO Example</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body bgcolor=""#FFFFFF"">"
HTML = HTML & "<p><font size=""6"" face=""Arial Black""><strong>Exchange CDO "
HTML = HTML & "Sample<img src=CDO.jpg>"
HTML = HTML & "</strong></font></p>"
HTML = HTML & "<p>CDO for NTS allows an easy way to send mail."
HTML = HTML & "This example shows how the content can be an HTML page"
HTML = HTML & "which allows you to send rich text and inline graphics.</p>"
HTML = HTML & "</body>"
HTML = HTML & "</html>"
myMail.AttachURL server.mappath("pics/1044.jpg"
myMail.From = "test1@test1.com"
myMail.To = "test1@test1.com"
myMail.Subject = "Sample Message"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send