Forums
This topic is locked
HTML mailBody:CDONTS
Posted 02 Oct 2002 16:23:15
1
has voted
02 Oct 2002 16:23:15 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 , but it's only for VBScript! isn't there one for Javascript as well!
I've just done like this:
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 = "<html>"+
"<body>"+
"<head>"+
"</head>"+
"<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Dear <font color="#990000"><b>+ <%Request.Form("FirstName"

//other few items
"</body>"+
"</html>" ;
why is it not working?
Thanks Sabs
Response.Write("Mail was Sent"

ObjEmail = "";
Replies
Replied 03 Oct 2002 02:11:34
03 Oct 2002 02:11:34 Sabina Ranjit replied:
Hi again,
I found that UD actually removes all the code write starting from strBody = "<html">+.....on SAVE and reverts back to the previously saved one when I try it again.
Help pls... what's happening?
And also does anyone know a Javascript version of doing this thing.
Thanks
Sabs
I found that UD actually removes all the code write starting from strBody = "<html">+.....on SAVE and reverts back to the previously saved one when I try it again.
Help pls... what's happening?
And also does anyone know a Javascript version of doing this thing.
Thanks
Sabs
Replied 03 Oct 2002 17:42:48
03 Oct 2002 17:42:48 Simon Bloodworth replied:
Hi, rather than tping it all out again follow this link to somewhere else i have posted
www.udzone.com/forum/topic.asp?TOPIC_ID=19944&FORUM_ID=544&CAT_ID=2&Topic_Title=HTML+Mail+Extension+for+DWMX&Forum_Title=%2A%2A%2A+Macromedia+MX+%2A%2A%2A
You will see the variable I have created for html, but notice that all quotation marks have been removed to and that rather than the plus at the end of each line use &_.
I hope this helps as I had a nightmare getting it right too.
Cheers
RedLeader
www.udzone.com/forum/topic.asp?TOPIC_ID=19944&FORUM_ID=544&CAT_ID=2&Topic_Title=HTML+Mail+Extension+for+DWMX&Forum_Title=%2A%2A%2A+Macromedia+MX+%2A%2A%2A
You will see the variable I have created for html, but notice that all quotation marks have been removed to and that rather than the plus at the end of each line use &_.
I hope this helps as I had a nightmare getting it right too.
Cheers
RedLeader