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

emailing asp page form results

Status
Not open for further replies.

scribbler

MIS
Feb 4, 2002
206
GB
Can anyone please tell me if the following is possible..

I have an ASP page wich contains results from a Request.from on wich I'd like to place a button and by clicking on this button I'd like to be able to email the ASP page info onto myself. I have used CDOsys previously to construct email bosy and send the email out but haven't a clue how to send an existing page via a button click.
 
When you build the page, you can duplicate the page data into the email. For example:
Code:
strName = "Name: " & Request.Form("Name") & "<br />"
strAddress = "Address: " & Request.Form("Address") & "<br />"

Response.Write strName & strAddress

strEmailBody = strName & strAddress

Set objMail = Server.CreateObject("CDO.Message")
'CDO configuration bits here
objMail.to = "you@you.com"
objMail.from = "me@me.com"
objMail.subject = "your subject here"
objMail.body = strEmailBody
objMail.send
Set objMail = Nothing

Tony

Spirax-Sarco - steam traps control valves heat exchangers
Sun Villa - Luxury Florida accommodation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top