Print Page | Close Window

send dynamic result to email

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=29671
Printed Date: 28 March 2026 at 6:01am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: send dynamic result to email
Posted By: toke
Subject: send dynamic result to email
Date Posted: 18 August 2011 at 4:11pm
Hi,

I have successfully created a simple html form that called an asp to load customers information.  The result page displayed fine.  What I would like to do next is to be able to email this result page.  Can someone help me or show me how to do it, please?

Thanks.



Replies:
Posted By: toke
Date Posted: 23 August 2011 at 7:52pm
Would it help if I post the code that I have been using?


Posted By: dpyers
Date Posted: 24 August 2011 at 3:38pm
It depends upon when you want the email created.
1. Create the email automatically when the page is created.
2. Display the created page first with a button on it to email the page contents.

In either event, you need to create a string containing the specific items you want to email and then use that string as the body of the mail.

In case 1, the string creation and subsequent emailing is in addition to the page creation code.
In case 2, you'd call a separate asp to grab the information again and format it for an email.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: toke
Date Posted: 30 August 2011 at 4:40pm
Thank you dpyers.

Quote
2. Display the created page first with a button on it to email the page contents.

In either event, you need to create a string containing the specific items you want to email and then use that string as the body of the mail.

In case 2, you'd call a separate asp to grab the information again and format it for an email.


I would like to do the 2nd option.  But I don't know how to put all the information in a for loop in ASP and send it to the email page.

All I have in the page content is ...


Do While Not rs.eof

response.write rs("fname") & rs("lname")

rs.MoveNext
Loop


So how do I put each fname and lname into says.. firstname1, firstname2, lastname1, lastname2 and so on and email these nicely?

Thank you again.






Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net