ah yes i received your comment, thx u
yes i know of the CDONTS object, and i guess i need to correct my
original statement then: i need for the program to work under iis60 and
to the best of my knowledge CDONTS is not available under iis60 (i found
that frustrating actually to say the least)
i believe there is another server object under iis60, but my initial
quick look at the related docs showed that it was much more complicated
to create a email object - i could be wrong, thought - i was looking for
a quick simple way to do this, as it was possible with CDONTS
anyway, thx, but i need to repost my question with the requirement that
it must work under iis60 (that's the production server actually)
_____
From: Jake [mailto:sp******@alltel.net]
Posted At: Wednesday, January 26, 2005 21:32
Posted To: microsoft.public.inetserver.asp.general
Conversation: creating and sending html email from asp server script
Subject: Re: creating and sending html email from asp server script
objMail.BodyFormat = 0
objMail.MailFormat = 0
http://www.4guysfromrolla.com/webtec...ail/faq6.shtml
HTH
"Francois Keyeux" <francois@REMOVE_CAPS_AND_INVALIDkeyeux.com.invali d>
wrote in message news:Oc**************@TK2MSFTNGP14.phx.gbl...
hello everyone:
i have a web site built using vbasic active server scripting running on
iis (it works on either iis 50 and 60, but is designed for iis 50)
i know how to create a plain text email by creating a text file, with
content following certain format, and saving that file into the correct
'..\mailroot\pickup' folder, and it is working fine
what i would like to know is how to create and send an email in html
format from my server script
i will appreciate anyone who can tell me where to find instructions on
how to do this
thank you much in advance
francois
You can send email messages in HTML format with the SMTP service
(CDONTS) or MS Exchange. However beware that not all mail clients will
display it properly.
By default, CDONTS sends its emails in plain-text format. With
HTML-formatted email, however, we can do all sorts of neat stuff, such
as having different fonts, italics, colored text, embedded-images, etc.
<%
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
'//these are all the images that are in this message.
'//you must include them like this.
'//please note that you DO NOT have TO write the
'//entire file path in the <IMG> tag in the body after this.
'//make sure you see the image name after the path separated by a
comma
objMail.AttachURL "D:\images\myImage.gif", "myImage.gif"
objMail.AttachURL "D:\images\myImage2.gif", "myImage2.gif"
HTML = HTML & "<HTML>"
HTML = HTML & "<HEAD>"
HTML = HTML & "<TITLE>Send Mail with HTML</TITLE>"
HTML = HTML & "</HEAD>"
HTML = HTML & "<BODY bgcolor=""lightyellow"">"
HTML = HTML & "<TABLE cellpadding=""4"">"
HTML = HTML & "<TR><TH><FONT color=""darkblue"" SIZE=""4"">"
HTML = HTML & now() & " - "
HTML = HTML & "These are all great ASP Sites</FONT></TH></TR>"
HTML = HTML & "<TR><TD>"
HTML = HTML & "<A HREF=""http://www.4guysfromrolla.com"">"
HTML = HTML & "<IMG SRC=""myImage.gif""></A><BR><BR>"
HTML = HTML & "<A HREF=""http://www.4guysfromrolla.com"">"
HTML = HTML & "<IMG SRC=""myImage2.gif""></A><BR><BR>"
HTML = HTML & "</FONT></TD></TR></TABLE><BR><BR>"
HTML = HTML & "</BODY>"
HTML = HTML & "</HTML>"
objMail.From = "ro*@tconsult.com"
objMail.Subject = "Your daily HTML Mail"
'you need TO add these lines FOR the mail
'to be sent in HTML format
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.To = "yo*@yourhouse.com
objMail.Body = HTML
objMail.Send
Response.write("Mail was Sent")
set objMail = nothing
%>