Using a dynamic ASP page as an email template.

D

da

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/emailtemplates/grid23.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???
 
J

Jeffrey Palermo [MCP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top