Using a dynamic ASP page as an email template.

Discussion in 'ASP .Net' started by da, Dec 10, 2004.

  1. da

    da Guest

    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???
     
    da, Dec 10, 2004
    #1
    1. Advertising

  2. 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/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???
    >
    >
     
    Jeffrey Palermo [MCP], Dec 10, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    545
    AdamM
    Jul 27, 2004
  2. gdc

    using email template asp.net

    gdc, Jul 30, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    540
    Steve C. Orr [MVP, MCSD]
    Jul 30, 2004
  3. =?Utf-8?B?YW50YXJlczY4Ng==?=

    Using an web page a a template for email on data submit.

    =?Utf-8?B?YW50YXJlczY4Ng==?=, Jul 22, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    598
    souri challa
    Jul 22, 2005
  4. Chris Theis
    Replies:
    2
    Views:
    486
    Chris Theis
    Jul 24, 2003
  5. NickH
    Replies:
    9
    Views:
    180
    Randy Webb
    Jan 22, 2004
Loading...

Share This Page