| Author |
Topic Search Topic Options
|
Anakin
Newbie
Joined: 27 January 2004
Location: Belgium
Status: Offline
Points: 8
|
Post Options
Thanks(0)
Quote Reply
Topic: uploading a file, and e-mailing it 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 ^_^
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
Anakin
Newbie
Joined: 27 January 2004
Location: Belgium
Status: Offline
Points: 8
|
Post Options
Thanks(0)
Quote Reply
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 
|
 |
zMaestro
Senior Member
Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
|
Post Options
Thanks(0)
Quote Reply
Posted: 30 January 2004 at 11:47am |
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
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. |
|
 |
Anakin
Newbie
Joined: 27 January 2004
Location: Belgium
Status: Offline
Points: 8
|
Post Options
Thanks(0)
Quote Reply
Posted: 30 January 2004 at 4:24pm |
I'll upload 'bout next week 
But thanx, this might be very helpfull, I guess :p
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
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.
- Uploading the file and text data to the server.
- 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 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+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
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
Anakin
Newbie
Joined: 27 January 2004
Location: Belgium
Status: Offline
Points: 8
|
Post Options
Thanks(0)
Quote Reply
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?
|
 |