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

How do I use the value of a variable in VBScript as part of the Email?

Status
Not open for further replies.

kazai

Programmer
Oct 19, 2001
24
US
hello,
I'd like to know how to use a VBScript variable's value as part of the Message body in the email.
For eg.
<%
Dim Var
Dim Mail
Var = Request.Form(&quot;txt_Var&quot;)
-- create all the mail objects.
set Mail = server.CreateObject(&quot;CDONTS.NewMail&quot;)
Mail.body = Var
-- so, this is equivalent to sending the value of the variable Var, right?? but this does'nt work. So I'd like to know how it can be done.

PLEASE REPLY ASAP!!! YOUR help is greatly appreciated.
Thanks,
Radhika.


%>
 
Radhika,

This should work. Your Request.Form statement may be giving you an empty string.

Just for troubleshooting, issue a Response.Write &quot;Value: &quot; & Request.Form(&quot;txt_Var&quot;) somewhere in your page. See what renders in the browser window !!

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top