Forums

ASP

This topic is locked

cdonts-HTML-email

Posted 03 Oct 2002 02:43:47
1
has voted
03 Oct 2002 02:43:47 Sabina Ranjit posted:
Hi,
'm using ASP/Javascript.DW UD4, access 2000
After form submission, it inserts records in my database, sends email.. but email body has nothing!! great

I've tried to make a good layout for the email being sent using tables, font styles and so on.. doesn't seem to work. It sends blank email body.
I saw this Send HTML Mail Extension 1.0 Beta 4 in the udzone.com , but it's only for VBScript! isn't there one for Javascript as well!

What I've done is<img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>only part of the code)

var strbody = "";

var ObjEmail = Server.CreateObject("CDONTS.NewMail";

ObjEmail .From = " ";
ObjEmail .Subject = "Thank you";
ObjEmail .To = Request.Form("Email";
ObjEmail .Body = strbody ;
ObjEmail .Send();
strBody = "&lt;html&gt;"+
"&lt;body&gt;"+
"&lt;head&gt;"+
"&lt;/head&gt;"+
"&lt;p&gt;&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="2"&gt;Dear &lt;font color="#990000"&gt;&lt;b&gt;+ &lt;%Request.Form("FirstName"%&gt;,&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;"
//other few items
"&lt;/body&gt;"+
"&lt;/html&gt;" ;


Response.Write("Mail was Sent";

ObjEmail = "";

why is it not working?

And also I tried setting the body as<img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>msdn example code)
HTML = "&lt;!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN""&gt;"+ "&lt;br&gt;";
HTML = HTML + "&lt;html&gt;";
HTML = HTML + "&lt;head&gt;" ;
HTML = HTML + "&lt;meta http-equiv=""Content-Type""";
HTML = HTML + ""content=""text/html; charset=iso-8859-1""&gt;"" ;
HTML = HTML + "&lt;title&gt;Sample NewMail&lt;/title&gt;" ;
HTML = HTML + "&lt;/head&gt;" ;
HTML = HTML + "&lt;body&gt;";
HTML = HTML + "Dear + "(Request.Form("FirstName");"";
HTML = HTML + "Thank you sending your enquiry!";
HTML = HTML + "We will contact you via email soon";
HTML = HTML + "Please verify the following inputs in your form, We have:";
HTML = HTML + "First Name:+ "(Request.Form("FirstName");""
HTML = HTML + "Email:+ "(Request.Form("Email");""
HTML = HTML + "&lt;/body&gt;" ;

gives error on the first line:
Someone help me with this please. It doesn't seem to work.
Thanks
Sabs

Replies

Replied 22 Oct 2002 18:06:13
22 Oct 2002 18:06:13 mark capa replied:
<font face='Arial'>
Would also be interested in an answer to your question.

I currently send out newsletter via form submission, and the resulting email isn't pretty.

I'm wanting to send out a html designed newsletter to the email addresses in my database, but not sure where to start on this.

Any thoughts?

</font id='Arial'>

www.gwenap.net
Free Vibrators to European countries.
Spice Up Your Sex Life!

Reply to this topic