CoverYourASP --> Snippets

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
25 active users
2142 visitors today
1902 pages today
(only part of today)
Tools I use

Copyright © 1999-2016 James Shaw.
All rights reserved.

RSS submissions

Now open source with SourceForge!

"Snippets" are mini-articles - they allow me to very quickly add answers to your frequently asked questions, and add brief explanations for topics that you've searched for without success. So, everytime you send an email or perform a search, chances are a new snippet will be the result!

2 Oct: Q&A;: How do I attach an ASP page to an email?


I have a form email an attachment which is a page pulled from our server. This is fine but when I want to email the dynamic content it just won't go - I have spent days on trying to find a work around.

For example

attachfile "e:/endowments/to_excel.asp", "newFile.xls"

This works fine but I really want to use this:

attachfile "e:/endowments/to_excel.asp?ID=37", "newfile.xls"

Do you think there is a work around?


attachfile just picks up the file from the hard disc and sends it - it doesn't "run" the file. To a file system a ?ID=37 just looks like you're trying to open a file using a ? wildcard (which won't work either)

You need to use a "screen scraper" to request the page from your server and save it to disk, then attach that.

For an example of a scraper, read my article about grabbing ASPWire content or buy one of the many components that will do it for you like IP*Works!.

Featured sponsor
My favorite resources

CoverYourASP Mugs, T-shirts, caps - even Boxer shorts...
I don't make a penny from these, but they're a lot of fun! Don't you need a new mouse mat?

I share my content

Supporting ASPRSS

Do you need a quick and easy way to link to my articles? All the information you need is published with ASPRSS...