If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > uploading file and attaching to email

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-17-04, 21:54
breeze76 breeze76 is offline
Registered User
 
Join Date: Apr 2004
Posts: 75
uploading file and attaching to email

I have a form that I want the user to be able to attach a file and upload it with the form, then get the file that was up loaded and send it out as an attachment with an email. I am using CDONTS and I can get the form info to send out in an email as well as an email to the person who filled out the from, but I can not figure oout how to upload a file and then attach it to the email. Anyone out there that can help..

Thanks

breeze76
Reply With Quote
  #2 (permalink)  
Old 04-18-04, 10:48
breeze76 breeze76 is offline
Registered User
 
Join Date: Apr 2004
Posts: 75
Re: uploading file and attaching to email

Quote:
Originally posted by breeze76
I have a form that I want the user to be able to attach a file and upload it with the form, then get the file that was up loaded and send it out as an attachment with an email. I am using CDONTS and I can get the form info to send out in an email as well as an email to the person who filled out the from, but I can not figure oout how to upload a file and then attach it to the email. Anyone out there that can help..

Thanks

breeze76
Ok I got the upload file thing solved.. now I need to be able to attach it to the outgoing email... If the file was the same format and name I could do it, but the file or files will be differnt names and types.. so Now I need to attach to the email..

breeze76
Reply With Quote
  #3 (permalink)  
Old 04-19-04, 00:22
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Don't know if this might hopefully help but www.asp101.com has some good e-mail examples in the Samples section.
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
  #4 (permalink)  
Old 04-19-04, 01:01
breeze76 breeze76 is offline
Registered User
 
Join Date: Apr 2004
Posts: 75
Quote:
Originally posted by Bullschmidt
Don't know if this might hopefully help but www.asp101.com has some good e-mail examples in the Samples section.
Thanks but they do not have anything there that can help.. I have gotten as far as they are.. and i can attach a file if i use a static file name... but i need to be able to use a variable file name to use the file that they upload instead of a file that is already there..

breeze76
Reply With Quote
  #5 (permalink)  
Old 04-19-04, 01:18
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Well in the E-mail with Attachment sample perhaps change this:

' Attachment using known static physical path
.AddAttachment "c:\somepath\somefile.txt"

To be more like this instead:

' Attachment using known static physical path and variable filename.
.AddAttachment "c:\somepath\" & varMyFilename
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
  #6 (permalink)  
Old 04-19-04, 01:25
breeze76 breeze76 is offline
Registered User
 
Join Date: Apr 2004
Posts: 75
OK will give it a try, I just need to DIM my variables, correct?

breeze76
Reply With Quote
  #7 (permalink)  
Old 04-19-04, 01:33
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
If you have this toward the top of the page then you must Dim each variable before using it:

<%
Option Explicit
%>

And the idea here is that this is a favor to yourself so that you DO get an error if using a variable (perhaps that is a typo or something) that was not explicitly dimmed.
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On