Home » questions » Is there a way to allow a user to upload files when sending the administrator a message via Mail.CGI

Is there a way to allow a user to upload files when sending the administrator a message via Mail.CGI

2006-07-30 14:09:15, Category: Programming & Design
I'm using TripodMail.pm and I want to be able to allot the user to attatch up to 6 files and have them sent to my email upon pressing the submit button.

Answers

  1. sterno73

    On 2006-07-30 14:53:45


    It doesn't look like TripodMail.pm allows you to add attachments. I'm including a link that uploads files to the server. It depends what type of files the users will be uploading as to whether or not you will want to go this route. Also, it adds the possibility that you will need to make sure the files are getting downloaded from the directory periodically. This could be done with a script to automate the process, but that doens't prevent someone from downloading a huge file and hogging all your server space. One note about the script linked to, it uses CGI::Carp to report errors to the browser, and I don't think that this module is accessible with a Tripod account. It also presents a security risk and shouldn't be used when a script is in production anyway. One thing I noticed is that TripodMail appears to just be a convenience interface to the sendmail binary, which means that you could probably create your own calls to sendmail directly, and I would guess there would be a way to send attachments. I don't know anything about sendmail, though. Might want to post another question.