Print Page | Close Window

uploading a file, and e-mailing it

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=9350
Printed Date: 31 March 2026 at 9:41pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: uploading a file, and e-mailing it
Posted By: Anakin
Subject: uploading a file, and e-mailing it
Date Posted: 29 January 2004 at 9:00am

I'm having trouble with attaching a file to a mail-form.

I believe I have seen a topic about this somewhere on the board, but I can't find it.

So, can anyone point me in the right direction, please?
Or if someone can tell me how I can do this, that'll be fine too ^_^




Replies:
Posted By: dpyers
Date Posted: 29 January 2004 at 8:13pm
What email components do you have available?

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Anakin
Date Posted: 30 January 2004 at 7:09am

You mean CDONT and stuff?

I wouldn't have a clue
I have to build a site, which uses a mail-page, but I can't put anything on the server. I don't have access for another week, I guess..

My boss is on a holiday, he won't be back 'til Tuesday, so I can't ask him.

If you mean something else, then I apologise for my stupidity



Posted By: zMaestro
Date Posted: 30 January 2004 at 11:47am
Originally posted by Anakin Anakin wrote:


I have to build a site, which uses a mail-page, but I can't put anything on the server. I don't have access for another week, I guess..

so, how will you upload the code???

check this: http://www.aspemail.com/manual_01.html - http://www.aspemail.com/manual_01.html

Quote Memory attachments. You can now attach files directly from a database blob or memory upload without creating a temporary copy of the file on disk.



Posted By: Anakin
Date Posted: 30 January 2004 at 4:24pm

I'll upload 'bout next week

But thanx, this might be very helpfull, I guess :p



Posted By: dpyers
Date Posted: 30 January 2004 at 7:40pm

I assume you're going to have an email form that collects some text data and you also want it to prompt you for a file. both the text data and the file need to be sent as one email.

Think of the problem as having two pieces.

  1. Uploading the file and text data to the server.
  2. Send an email using the text data and with the file attached.

Your form has to include the form tag attribute ENCTYPE="multipart/form-data" and you'll need an <input type = "File"... tag.

http://www.asp101.com/resources/saupload.asp - http://www.asp101.com/resources/saupload.asp  is a good article explaining file uploads. There's a variety of fle upload components available, some of which also have progress bars.  Someone on this forum has developed a pure asp upload that doesn't use 3rd party components. Link is http://forums.webwiz.net/search.asp?KW=pure+asp+upload&SM=1&SI=TC&FM=0&OB=1 - http://forums.webwiz.net/search.asp?KW=pure+asp+upl oad&SM=1&SI=TC&FM=0&OB=1

Your form handler will have to save the file to disk, formatand send  an email using the text fields and attached file, then delete the uploaded file. This is an example of attaching a file using cdonts... http://www.powerasp.com/content/hintstips/asp-email.asp - http://www.powerasp.com/content/hintstips/asp-email.asp

 



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Anakin
Date Posted: 04 February 2004 at 8:40am

Ok, I looked at this, and I tried some. I have access to the server now, and I found out I can use CDONT. The only problem is, when I up my page, it says "Object doesn't support this property or method: 'AttachFile' "

Is it possible this is server-related, or could I be doing something wrong?




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net