AlamuKutty wrote:
> Having trouble with this part ..
>
> $file_attached = param('fileattach');
> $msg->attach(
> Type =>'application/msword',
> Path => $file_attached
>
> );
>
> It says file not found. I am guessing it looks in the webserver and not
> in the local machine?
That sounds plausible.
I would suggest that you split the problem in two parts.
1) You need to learn how to upload a file to the server machine.
2) You need to know how to send an email message with an attachment.
I'd suggest that you write two separate scripts to handle those things.
Only after you have done so successfully, it's time to combine them.
As regards uploading a file, please study the CGI.pm docs about it. Note
also that the form needs
enctype="multipart/form-data"
in the <form> element.
--
Gunnar Hjalmarsson
Email:
http://www.gunnar.cc/cgi-bin/contact.pl