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

Email populated Web Page as HTML

Status
Not open for further replies.

dpimental

Programmer
Jul 23, 2002
535
US
First of all I have the email script all set up. And, better yet, it works. It will even send html properly.

My question is this. Once the user submits the form, how do I set the entire page content, as it was entered, including all the html to my script.

I include my functions page (which the script is in) and I could then call the script....

Call emailPage(HTMLContent)

The script takes a singel arguement, the html content that you want emailed to the system.

My question is how to send the current page to that script?

Can you set a variable to the page content that was just posted?

Is there an envirnoment variable that contains the page content?

The page is sufficiently large that I don't want to have to take every form value and concatenate it and pass it to the script?

Any help on this?


David Pimental
(US, Oh)
 
I'm not sure I understand what you are trying to accomplish.

If the page you are trying to send is a plain HTML file then I suppose you could use the Scripting.FileSystemObject to open the file as a TextStream and then copy the entire contents of that file into the body of your email. If the page you are trying to send is an ASP then there is likely some server-side code that should definately NOT be added to the email because the email reader program won't be able to execute it.
 
The page is an asp page.

The web form the user fills out is what is going into the body of the email. But the client wants it formatted into html.

In other words, take the form that was fill out itself and send that as html in the body of the email.



David Pimental
(US, Oh)
 
So not the ASP but rather the OUTPUT of the ASP... the same as you would see if you did "View Source" in the browser?
 
Right, that's the ticket.

Is there an server variable that gives the page content that is displayed in the browser?

David Pimental
(US, Oh)
 
a way you can do it by screen scraping and dumping the html code retrieved into the email body. That way you use a dynamic page, by passing a query string via XMLHTTP.

make sure that you all of you graphics have absoloute references.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top