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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Emails 1

Status
Not open for further replies.

sciclunam

Programmer
Oct 12, 2002
138
MT
Hi, does anyone know what shall I use to send html emails with pictures etc...


Thanks


Mario
 
Thanks for your superfast reply.

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?

cheers

Mario
 
Hi Mario,

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.

Hope this helps,
Mickey
 
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(&quot;CDONTS.NewMail&quot;)

objMail.AttachURL &quot;D:\images\myImage.gif&quot;, &quot;myImage.gif&quot;
objMail.AttachURL &quot;D:\images\myImage2.gif&quot;, &quot;myImage2.gif&quot;


HTML = HTML & &quot;<HTML>&quot;
HTML = HTML & &quot;<HEAD>&quot;
HTML = HTML & &quot;<TITLE>Send Mail with HTML</TITLE>&quot;
HTML = HTML & &quot;</HEAD>&quot;
HTML = HTML & &quot;<BODY bgcolor=&quot;&quot;lightyellow&quot;&quot;>&quot;
HTML = HTML & &quot;<TABLE cellpadding=&quot;&quot;4&quot;&quot;>&quot;
HTML = HTML & &quot;<TR><TH><FONT color=&quot;&quot;darkblue&quot;&quot; SIZE=&quot;&quot;4&quot;&quot;>&quot;
HTML = HTML & now() & &quot; - &quot;
HTML = HTML & &quot;These are all great ASP Sites</FONT></TH></TR>&quot;
HTML = HTML & &quot;<TR><TD>&quot;
HTML = HTML & &quot;<A HREF=&quot;&quot; HTML = HTML & &quot;<IMG SRC=&quot;&quot;myImage.gif&quot;&quot;></A><BR><BR>&quot;
HTML = HTML & &quot;<A HREF=&quot;&quot; HTML = HTML & &quot;<IMG SRC=&quot;&quot;myImage2.gif&quot;&quot;></A><BR><BR>&quot;
HTML = HTML & &quot;</FONT></TD></TR></TABLE><BR><BR>&quot;
HTML = HTML & &quot;</BODY>&quot;
HTML = HTML & &quot;</HTML>&quot;

objMail.From = &quot;Me@MyISP.com&quot;
objMail.Subject = &quot;Your daily HTML Mail&quot;

'you need TO add these lines FOR the mail
'to be sent in HTML format
objMail.BodyFormat = 0
objMail.MailFormat = 0

objMail.To = &quot;you@yourhouse.com
objMail.Body = HTML
objMail.Send

Response.write(&quot;Mail was Sent&quot;)
set objMail = nothing
response.redirect &quot;somewhere_else.asp&quot;
%>




[sup]
<%=Tony%>
banana.gif
rockband.gif
banana.gif
 
Thanks all for the help. I shall try it.

regards

mario
 
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
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
But wouldn`t I end up with large emails since it will include all pics.

regards

Mario
 
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 & &quot;&quot;content=&quot;&quot;text/html; charset=iso-8859-1&quot;&quot;>&quot;&quot;
------------------^ (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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top