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

Can I capture an ASP page's output and email it?

Status
Not open for further replies.

andrewEmbassy

Programmer
Aug 2, 2005
15
US
I've got this receipt page that pulls all this info from cookies and databases and forms and stuff, and I want to basically email a copy of that page to the company and the user- and while I could go through and replace every "Response.Write(...." with "emailString = emailString & ...", I was wondering if maybe there was a better way of doing it, like maybe I could stream the output of the ASP page into a file and mail that or something? Ideas?

Andrew
 
Not quite. I believe the closest you could come to that would be to use an XMLHTTP object to call the page (though this would not have access to any Coockie or Session data for the user).
There is no built-in method to access the contents of the Request buffer once you have written to it (unfortunatly). Unfortunatly your best bet is going to be to put it all in a string and then write that string to both your email and to the Response buffer. It will be innefficient but probably more efficient and less a pain in the rear then using an XMLHTTP object.

-T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top