Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using a dynamic ASP page as an email template.

Reply
Thread Tools

Using a dynamic ASP page as an email template.

 
 
da
Guest
Posts: n/a
 
      12-10-2004
I need to send an .ASP page as an email template using VBScript. I'd like
to do so using CDONTS or CDOSYS.

this is the dynamic email template
http://www.womentowomen.info/emailte...d23.asp?id=122

the script needs to loop through a recordset and send emails using data from
SQL 2000.

when i try to send using a script i built the asp page pulls in without
rendering the asp. how can i pull the rendered asp into my vb for emailing?

Please help???


 
Reply With Quote
 
 
 
 
Jeffrey Palermo [MCP]
Guest
Posts: n/a
 
      12-10-2004
You ASP must be processed through your web server to render correctly. You
can't just grab the .asp file contents. Use the following code snippet to
get the .asp from the web.

System.Net.WebClient wc = new System.Net.WebClient();

StreamReader stm = new
StreamReader(wc.OpenRead("http://www.womentowomen.info/emailtemplates/grid23
..asp?id=122"));

return stm.ReadToEnd();


You will have to change image references for them to render correctly.

--
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo


"da" <> wrote in message
news:am7ud.53994$...
> I need to send an .ASP page as an email template using VBScript. I'd like
> to do so using CDONTS or CDOSYS.
>
> this is the dynamic email template
> http://www.womentowomen.info/emailte...d23.asp?id=122
>
> the script needs to loop through a recordset and send emails using data

from
> SQL 2000.
>
> when i try to send using a script i built the asp page pulls in without
> rendering the asp. how can i pull the rendered asp into my vb for

emailing?
>
> Please help???
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Master Page & Dynamic Page Title Chris Walls ASP .Net 8 07-25-2007 05:38 PM
Creating multi-page dynamic page in ASP.NET Vadim Vulfov ASP .Net 3 06-02-2005 01:13 PM
Dynamic control on aspx page, dynamic location Chris Thunell ASP .Net 3 07-21-2004 04:52 PM
Email the content of an ASP page using the email client NickH Javascript 9 01-22-2004 05:46 PM
Calling a html page from an asp page then returning to the next statement on the original asp page Chuck ASP General 0 07-05-2003 02:00 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57