Same Question - Attachng files to a form

Results 1 to 7 of 7

Thread: Same Question - Attachng files to a form

  1. #1
    Chad Franklin Guest

    Default Same Question - Attachng files to a form

    I posted a question on Friday and today it is gone?? What I asked was there a way to attach a file to an email form? Basically somone files out a form on my site and they click submit and an email get sent to a couple of people. What people have asked is they want to attach a document to the form they are filling out. Is that possiable and how?

  2. #2
    omc Guest

    Default RE: Same Question - Attachng files to a form

    You can do that, but you will need a component. I have used SA-FileUp (www.softwareartisans.com). It does cost $$$. I don&#039t remember how much, but I think it was in the neighborhood of $180. There are free ones too. I remember someone mentioning a free on on this message board last week or the week before.<BR><BR>You can see older messages. There is a link at the top of the pages to the previous week. If you need a free one I&#039m sure there is a message about that. But one word of warning, most of the file upload componenets will only allow you to pass the file and nothing else through the form. So the file upload would have to be on a page by itself. SA-FileUp allows you to pass other form elements with the file.<BR><BR><BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    2,238

    Default RE: Same Question - Attachng files to a form

    Yes it is possible with IIS4 using CDONTS<BR><BR>Here is example code:<BR><BR>&#060;%<BR>&#039 The following code example demonstrates the use of<BR>&#039 the Form collection of the Request object to retrieve<BR>&#039 the values entered by the client into an HTML form.<BR>Dim strComName<BR>Dim strEmail<BR>&#039 Retrieve the information from the form&#039s text boxes.<BR>strComName= Request.Form("txtComName")<BR>strEmail= Request.Form("txtEmail")<BR><BR>%&#062;<BR><BR><BR >Thank you<BR>&#060;%<BR>response.write "&#060;input type=text name=txtEmail value=" & strEmail & "&#062;"<BR>%&#062;<BR>from<BR>&#060;%<BR>response .write "&#060;input type=text name=txtComName value=" & strComName & "&#062;"<BR>%&#062;<BR>, for your interest in YourEq.com Electronics Superstore on the World Wide Web<BR>&#060;%<BR>Dim strFrom<BR>Dim objCDOMail<BR>strFrom = Request.Form("txtEmail")<BR>Set objCDOMail = Server.CreateObject("CDONTS.NewMail")<BR>objCDOMai l.From = "us@youreq.com"<BR>objCDOMail.To = strFrom<BR>objCDOMail.Bcc = "us@youreq.com"<BR>objCDOMail.Subject = "Information from YourEq.com"<BR>&#039 Attach a file<BR>objCDOMail.AttachFile "d:209.33.82.81commercead_pricing.htm"<BR>&#03 9 Send the message!<BR>objCDOMail.Send<BR>Set objCDOMail = Nothing<BR>%&#062;<BR>

  4. #4
    omc Guest

    Default yes, you're right

    Yes, You are right. I misunderstood the question. I missed that this it through an E-Mail form as opposed to a form that updates a database.


  5. #5
    Chad Franklin Guest

    Default RE: Same Question - Attachng files to a form

    It doesn&#039t like objCDOMail.AttachFile "TEST.txt" I been using CDONTS.NewMail to send my mail. Can this Simple Mail Transfer Protocol attach a file. If we can do this that is great, but the user will need to choose his own file he want to attach.<BR><BR>

  6. #6
    Chad Franklin Guest

    Default RE: Same Question - Attachng files to a form

    error &#039 80004005&#039 <BR>Unspecified error <BR><BR>/intouch/test/email_cdo.asp, line 59 <BR><BR>This is the error I get. It can handle everthing else. I tried modifying the code to this. objCDOMail.AttachFile "c: est est.txt", "test.txt"<BR>I&#039m thinking it can&#039t find the file??<BR>

  7. #7
    Join Date
    Dec 1969
    Posts
    2,238

    Default RE: Same Question - Attachng files to a form

    If you are using a remote host, call them and ask them what the exact path is.. that is what I had to do.<BR><BR>Sorry, I can&#039t be more of a help but I am a begginer and am trying out for an entry level job tomorrow and the following 2 days, so my time is short tonight doing research.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •