1

I want to send an HTML email where the body of the email is basically another HTML page. Is it possible to do that? The HTML page to send contains database records.

I tried using Msxml2.ServerXMLHTTP.3.0 to generate a HTTP request and store the response.Text into the email HTML body variable but I encounter a problem with timeouts similar to this.

Community
  • 1
  • 1
greener
  • 4,989
  • 13
  • 52
  • 93

1 Answers1

0

The approach to take with this requirement is to create an ASP include file which encapsulates the HTML generation of the original page isolating it from the ASP Response object.

The original page would then include this new file, use it to generate HTML which it would then send to the Response. Your emailing page can also include this new file and use it to generate HTML for it to assign to the HTMLBody property of a CDO Message.

In reality that is quite a big change when the original page might have significant HTML content outside of <% %>. In that case I would generate an intermediatory XML DOM then use XSL to transform the XML to the required HTML.

AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306
  • I don't understand exactly how you mean. How do I fit the HTML of a Server-Side Include into a variable (the HTMLBody)? – greener Jul 11 '12 at 17:18