I'm trying to retrieve the data off a form (survey.htm) and email the results
back to me using CDO and ASP (survey.asp). I'm confused as to how to
retrieve the form data from survey.htm and send it using survey.asp. Below is
a sample ASP script that I found on ASPFAQ.com and it works fine, but now how
do I grab the info from a form and incorporate it into the emal. Thanks.
Appreciate any help or guidance.
Kenny
<%
sch = "http://schemas.microso ft.com/cdo/configuration/"
Set cdoConfig = CreateObject("C DO.Configuratio n")
With cdoConfig.Field s
.Item(sch & "sendusing" ) = 2 ' cdoSendUsingPor t
.Item(sch & "smtpserver ") = "servername "
.update
End With
Set cdoMessage = CreateObject("C DO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "me@you.com "
.To = "me@you.com "
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%> 3 3032
Depending on how you want to do it, if you want it to look nice, just make
your .TextBody something like this
..TextBody = "Name: " & Request.Form("N ame") & "<br>Addres s: " &
Request.Form("A ddress")" 'and so on and so on
If you want it just thrown in there all messy looking just do this,
..TextBody = "Form Data is <br>" & Request.Form()
If your form method is set to GET, change Request.Form to
Request.Queryst ring.
HTH,
Drew
"Kenny" <Ke***@discussi ons.microsoft.c om> wrote in message
news:5D******** *************** ***********@mic rosoft.com... I'm trying to retrieve the data off a form (survey.htm) and email the results back to me using CDO and ASP (survey.asp). I'm confused as to how to retrieve the form data from survey.htm and send it using survey.asp. Below is a sample ASP script that I found on ASPFAQ.com and it works fine, but now how do I grab the info from a form and incorporate it into the emal. Thanks. Appreciate any help or guidance.
Kenny
<% sch = "http://schemas.microso ft.com/cdo/configuration/"
Set cdoConfig = CreateObject("C DO.Configuratio n")
With cdoConfig.Field s .Item(sch & "sendusing" ) = 2 ' cdoSendUsingPor t .Item(sch & "smtpserver ") = "servername " .update End With
Set cdoMessage = CreateObject("C DO.Message")
With cdoMessage Set .Configuration = cdoConfig .From = "me@you.com " .To = "me@you.com " .Subject = "Sample CDO Message" .TextBody = "This is a test for CDO.message" .Send End With
Set cdoMessage = Nothing Set cdoConfig = Nothing %>
Thanks, I really appreciate your help. I was able to use "& request.form() &"
to get the information but just like you said, it looked all mumble jumbled
together. I tried inserting html coding; however, using it in TextBody = " "
only repeats the html coding in the message, so when I type <br>, that's what
appears in the email generated the code <br> instead of the line break. How
do I import the form and use html?
Kenny
"Drew" wrote: Depending on how you want to do it, if you want it to look nice, just make your .TextBody something like this
..TextBody = "Name: " & Request.Form("N ame") & "<br>Addres s: " & Request.Form("A ddress")" 'and so on and so on
If you want it just thrown in there all messy looking just do this,
..TextBody = "Form Data is <br>" & Request.Form()
If your form method is set to GET, change Request.Form to Request.Queryst ring.
HTH, Drew "Kenny" <Ke***@discussi ons.microsoft.c om> wrote in message news:5D******** *************** ***********@mic rosoft.com... I'm trying to retrieve the data off a form (survey.htm) and email the results back to me using CDO and ASP (survey.asp). I'm confused as to how to retrieve the form data from survey.htm and send it using survey.asp. Below is a sample ASP script that I found on ASPFAQ.com and it works fine, but now how do I grab the info from a form and incorporate it into the emal. Thanks. Appreciate any help or guidance.
Kenny
<% sch = "http://schemas.microso ft.com/cdo/configuration/"
Set cdoConfig = CreateObject("C DO.Configuratio n")
With cdoConfig.Field s .Item(sch & "sendusing" ) = 2 ' cdoSendUsingPor t .Item(sch & "smtpserver ") = "servername " .update End With
Set cdoMessage = CreateObject("C DO.Message")
With cdoMessage Set .Configuration = cdoConfig .From = "me@you.com " .To = "me@you.com " .Subject = "Sample CDO Message" .TextBody = "This is a test for CDO.message" .Send End With
Set cdoMessage = Nothing Set cdoConfig = Nothing %> http://www.powerasp.com/content/new/...ail_cdosys.asp http://www.powerasp.com/content/new/...ing_cdosys.asp
"Kenny" <Ke***@discussi ons.microsoft.c om> wrote in message
news:2F******** *************** ***********@mic rosoft.com... Thanks, I really appreciate your help. I was able to use "& request.form() &" to get the information but just like you said, it looked all mumble jumbled together. I tried inserting html coding; however, using it in TextBody = " " only repeats the html coding in the message, so when I type <br>, that's what appears in the email generated the code <br> instead of the line break. How do I import the form and use html?
Kenny
"Drew" wrote:
Depending on how you want to do it, if you want it to look nice, just make your .TextBody something like this
..TextBody = "Name: " & Request.Form("N ame") & "<br>Addres s: " & Request.Form("A ddress")" 'and so on and so on
If you want it just thrown in there all messy looking just do this,
..TextBody = "Form Data is <br>" & Request.Form()
If your form method is set to GET, change Request.Form to Request.Queryst ring.
HTH, Drew "Kenny" <Ke***@discussi ons.microsoft.c om> wrote in message news:5D******** *************** ***********@mic rosoft.com... > I'm trying to retrieve the data off a form (survey.htm) and email the > results > back to me using CDO and ASP (survey.asp). I'm confused as to how to > retrieve the form data from survey.htm and send it using survey.asp. > Below > is > a sample ASP script that I found on ASPFAQ.com and it works fine, but > now > how > do I grab the info from a form and incorporate it into the emal. > Thanks. > Appreciate any help or guidance. > > Kenny > > <% > sch = "http://schemas.microso ft.com/cdo/configuration/" > > Set cdoConfig = CreateObject("C DO.Configuratio n") > > With cdoConfig.Field s > .Item(sch & "sendusing" ) = 2 ' cdoSendUsingPor t > .Item(sch & "smtpserver ") = "servername " > .update > End With > > Set cdoMessage = CreateObject("C DO.Message") > > With cdoMessage > Set .Configuration = cdoConfig > .From = "me@you.com " > .To = "me@you.com " > .Subject = "Sample CDO Message" > .TextBody = "This is a test for CDO.message" > .Send > End With > > Set cdoMessage = Nothing > Set cdoConfig = Nothing > %> > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Fatih BOY |
last post by:
Hi,
I want to send a report from a windows application to a web page like
'report.asp'
Currently i can send it via post method with a context like
local=En&Username=fatih&UserId=45&Firm=none
But the problem occures when i want to send a data with & sign (i.e:
Firm=F&B). I try to solve this problem with using boundary, but i failed.
Any idea!?
|
by: Raichu |
last post by:
Hi All,
I'm new to VC++.net and I searched through the forums and couldn't
find anything related to this.
I'm trying to send a flat file from a VC++.net program to a PHP file
residing on a webserver. I know you can call a website from
VC++.net, but I'm not sure how to send a physical file over the
internet. I mean is there a way to mimic a normal html form to
upload a file, using VC++.net?
|
by: eswanson |
last post by:
I have a web page I need to post a file plus some other fields to it. How
can I do this from a asp.net page. I know I can send individual fields to the
other page, but how do I send a file to the other page, or is there something
else like a stream which will be like a file. I am attempting to get a way
from writing out a file and then having to give the page that I am posting to
the file name. Instead I would like to just from asp.net...
|
by: Aj Blosser |
last post by:
Hey guys, I have a question for you,
I have a setup where I'm sending files through the POST to a php web page, I
read the file contents, put that file contents as text into the POST string,
and send it on it's way.
it works perfectly for text files. However, I can't open a word document
like a text file and have it give me the result I need. I'm looking for a
way to just open a word document and get all the values in it like you would...
|
by: southoz |
last post by:
Good ay all ,
I'm fairly new to access(a little over 5 weeks now). Since I'v started I have picked up a lot of useful information from forums such as this and in doing so will share that information with others. I have seen many request for information on mail merging an how to send data to word documents this is something I have put together with the answers given by others and I hope this will help a few newbies , I know there are easier ways...
| |
by: trig |
last post by:
Please help!
I am an ICT teacher at a secondary school and my year 12 (AS Level)
group need to create a website where data can be sent from a form to a
Microsoft Access database.
I am trying to do this in my own time and then hopefully teach them
how to do it.
I have installed IIS on my machine and have followed a few web
|
by: Malli mindwave |
last post by:
Hi,
We are using the yahoowebHostiing service for my company website, In
that one screen of the SendComments/FeedBack section is there, I'm
basically dot.net develeoper ,but yahoowebhosting not
support .asp,.aspx files, it supports PHP files,
I'm searching in JavaScript ,but not found any matter,
I'don't Know PHP.I'm having lot of pressure of higer officials.Please
help me on this.
|
by: ajaxcoder |
last post by:
Hi
In my project i had a login form and i am trying to send the username and password to the server for authentication using xmlHttpRequest. Hence i am using POST request but i am unable to send data. I tried sending using GET request and GET is working fine.
Here is code snippet
function postRequest() { \n\
if(window.ActiveXObject) \n\
xmlHTTPObj = new ActiveXObject('Microsoft.XMLHTTP'); \n\
else if (window.XMLHttpRequest) \n\
|
by: icyfenix |
last post by:
I'm a developer for my company and my job is to make things move faster and reduce overhead/labor dollars using software.
We are in an all-Microsoft environment.
The problem I am having is this: There is a website that our clerical staff has to use to update our insurance company every day on claim status. It has to be done anywhere from 150-350 times a day(we are a service center) and the website is very slow. It can take 10-20 minutes to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |