Email attachment in asp

Posted on 2012-09-17
Last Modified: 2012-10-24

I have an asp which let users to send email request. Now I want the users to be able to upload up to 3 attachment. Can some one pls provide sample codes?


Question by:mrong
    LVL 15

    Expert Comment

    Please see this article which has various examples with using CDO for sending emails:

    Author Comment


    Thank you for your reply. I need actual sample includes 'Browse' button and etc.

    LVL 52

    Expert Comment

    by:Scott Fell, EE MVE
    Below assumes you have aspupload component.  Classic asp by on it's own can not upload and you will need some type of component to be  added to your server to make it work.
    Set Upload = Server.CreateObject("Persits.Upload")
    Count = Upload.Save("c:\upload")
    Response.Write Count & " file(s) uploaded to c:\upload"

       <FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="UploadScript1.asp">
          <INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
          <INPUT TYPE="FILE" SIZE="40" NAME="FILE2"><BR>
          <INPUT TYPE="FILE" SIZE="40" NAME="FILE3"><BR>
       <INPUT TYPE=SUBMIT VALUE="Upload!">

    Author Comment

    Also this article are missing codes....the attachements have to be uploaded to the server before attach to email. thanks.
    LVL 15

    Accepted Solution


    Author Comment

    I found a script file to upload the attachment to web server without any aspupload component. Now I'd like to know how to upload multiple attachements to the email from C:/upload


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
    Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now