The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 2 of 2

Thread: ASP file email

  1. #1

    ASP file email

    I'm putting a form with a browse button on a page, so that clients can send me some pics of their own, directly to my email... heres my code for my form...
     <form method="post" action="photosupload.asp" name="submit" enctype="multipart/form-data">
    			  <font size="2">Enter your description : </font>
    			  <input name="textfield" type="text" size="70">
    			  <font size="2">Choose your photo:</font> 
    			  <input type="file" name="filefield"><br><br>
    			  <input name="submit" type="submit" id="submit" value="Submit">
    Now, I'm struggeling with the asp part.... I've only done normal submit forms. .. how do I code THAT so that the file gets send to my email?

    thank you in advance...

  2. #2
    you need to download a component on to your server (or talk to your hosts) that will enable you to send files from a users machine to the servers

    In this example I've used the CDONTS component

    	set smtp = Server.CreateObject("CDONTS.NewMail")
    	smtp.Subject="Page request"
    	smtp.Body = lmailstring
    	smtp.AttachFile("[insert file path here")
    ' lmailstring can be a HTML message/page or
    a simple "please find file attached"
    good tutorial on the CDONTS feature,

    if you're hosts don't use the CDONTS component they'll use another one that will be similar (there are a few components that do this and they all work the same. I've just used CDONTS because it's the most common)

    hope this helps
    now with blog, click here

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012