Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

ASP Email Help

Options
  • 27-04-2002 1:42am
    #1
    Registered Users Posts: 11,987 ✭✭✭✭


    I`m looking for some scripts that will enable a user to attach a file from his/her hard drive and this file will be emailed to me, also I would require validation on the file type......

    Anyone any help


Comments

  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Sending the attachment via email is the easy bit. I assume you know how to send email using the CDONTS.NewMail object, if not you'll find a simple (but fairly comprehensive) example here. Attachments are, ahem, attached using the AttachFile property.

    However, the difficult bit is uploading the attachment in the first place. On the client side, you'd want the user to send their file using:
    method="POST" enctype="multipart/form-data"
    
    Once it gets to your server, you'll want to write it to a directory on your server so that you can then attach it to an email. This is the tricky bit and while there are 3rd party COMs out there that let you do this, although I think none are actually free. Probably easy enough to do in VB/C++ to be honest (may even be pratical as just an ASP script). The important thing is differenciating wheither it's a text or binary file when writing it to the server.

    As for file type validation, off the top of my head I'd suggest using the filename extension. That's what Windows uses, after all.


  • Registered Users Posts: 11,987 ✭✭✭✭zAbbo


    Would it be easier to email the attachment or upload it onto a database i alreay have a database in place and i know how to update data as well, I found a script on hotscipts.com but documentation was poor and i was having a hard time configuring it:

    http://www.hotscripts.com/Detailed/9766.html

    As for valiation would i use the *.doc type stuff just to query the file name and type, i think i can do this and have used it on email forms(email address must have a *@*.com)

    Your help is much appreciated


  • Registered Users Posts: 14,761 ✭✭✭✭Winters


    www.webwizguide.com offer Good ASP scripts and information. They will be able to help you with your problem. I Found CDONTS very hard to work with and would never work with me :mad: . But there are some others you might want to look at.


  • Registered Users Posts: 706 ✭✭✭DJB


    All the scripts for Mailing List Manager v2.1 beta are on the way to you for testing before final release. The option to send html mails, text mails, attach files, and send them to all subcribers individually is included.

    We are working on another version that will work will all mail components such as jmail, aspemail, etc. We have already incorporated message logs, test emails, and the online html editor that really adds to the Mailing List Manager.

    It is programmed using asp, vbscript, MS Access and CDONTS. A new email is sent each time, to each subscriber so that nobody knows who the other subscribers are. There is a unsubscribe link sent on every mail so that the receiver can unsubscribe whenever they want (thus keeping with the legal stuff).

    If anyone else is interested give me a shout. We will be releasing the final product in the next 2 weeks.


    Thanks


    David Behan
    www.bmor.com


Advertisement