What mail client do you use?? Outlook Express? Other?
Your mail client should allow you to send emails in HTML format.
All you need to do then is to actually create the HTML page you wish to send. Can you do this?
I will be using Outlook. So, if I understand well, I have to create an html page as I did to create my website and send it. But how shall I insert it i Outlook? what about the pictures. these are usually in a separate folder. How should these be included?
Thats a good question. I don't use Outlook but I think it does allow you the option of sending in HTML format. Under Tools > options > mail format (if I remember correctly)
I would guess that you just need to insert your HTML in the email, and that the images need to be online. you would then need to link to them on your wehserver. I "presume" this so hopefully someone else can help.
Also there is a MS Outlook Forum on Tek Tips, i'm sure those guys can answer in a jiffy.
Here is what I do in Outlook 2000:
1) Insert --> File
2) Select your HTML file and then select "Insert As Text" from the Insert button dropdown (above the Cancel button).
Then your HTML should get dumped into the body of your email.
Yes, your images should reside on a web server and image tags should reference that web server.
Since you were posting this question in the Web Designers forum, I thought you were looking for a dynamic way to send HTML formatted emails from your site. But I guess that's not what you were asking, but in case you want to know,
here's the code
<%
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail"
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=""
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 = "Me@MyISP.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 = "you@yourhouse.com
objMail.Body = HTML
objMail.Send
Response.write("Mail was Sent"
set objMail = nothing
response.redirect "somewhere_else.asp"
%>
You can also do this without placing your images online.
1) Create your html page and place it (and all graphics) into your Outlook stationery folder (on my machine it is located under C:\Documents and Settings\tpn\Application Data\Microsoft\Stationery\).
2) Within Outlook, goto Actions >> New Mail Message Using >> More Stationery and select your HTML file from the list of stationery files.
Tony
This is just a useful method if you are emailing people without internet access or if you dont want to store online images for the shelf-life of the email. Tony
I am trying to generate an HTML email in an ASP script using the following code that TonyU posted but when I try to execute the script, it complains about the double quotation marks, such as:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/SendMail.asp, line 1185
sHTML = sHTML & ""content=""text/html; charset=iso-8859-1"">""
------------------^ (the caret is supposed to be under the c in content)
How do I get around the use of double quotes as both string delimters as well as HTML attribute delimiters?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.