stu96art has asked for the wisdom of the Perl Monks concerning the following question:
I was also wondering how I could download any file, possible not just a .gif file. I would look to download .dxf, .cad (drawing files), but be able to upload any type of file. Is this possible? Thanks.#!/usr/local/bin/perl -w use CGI; # load CGI routines use Mail::Sendmail; $q = new CGI; @names = $q->param; $name = $q->param('name'); $company = $q->param('company'); $address = $q->param('address'); $city = $q->param('city'); $state = $q->param('state'); $zip = $q->param('zip'); $phone = $q->param('phone'); $fax = $q->param('fax'); $email = $q->param('email'); $comments = $q->param('comments'); $file = $q->param('file'); print $q->header, # create the HTTP header $q->start_html(-title=>'Email Sent', -BACKGROUND=>'http://65.108.100.28/images/bkg3 +.jpg', -LINK=>'blue', -ALINK=>'maroon'), # start the HTML "<p align=\"center\"><font size=\"6\">Thank you<br><br></font +>", "<font size=\"7\">Your Email has been sent to stu96art@yahoo. +com</font>", # level 1 header '</p>', '<br><br><br><br>', "<p align=\"center\">Click here go to the <a color=\"blue\" h +ref=\"http://65.108.100.28/index.html\">home page</a><br><br>", "<p align=\"center\">Click here return to the <a color=\"blue +\" href=\"http://65.108.100.28/contact.html\">contact page</a><br><br +>", "<p align=\"center\">The values you sent were</p>", $q->h2("NAME: $name\n<br> COMPANY: $company\n<br> ADDRESS: $a +ddress\n<br> CITY: $city\n<br> STATE: $state\n<br> ZIP: $zip\n<br> PH +ONE: $phone\n<br> FAX: $fax\n<br> EMAIL: $email\n<br> COMMENTS: $comm +ents\n<br>"), $q->end_html; # end the HTML use MIME::Lite; $msg = new MIME::Lite From =>'technicu@technicut.net', To =>'stu96art@yahoo,com', Cc =>'some@other.com, some@more.com', smpt =>'64.176.60.59', Subject =>'A message with 2 parts...', Type =>'multipart/mixed'; attach $msg Type =>'TEXT', Data =>"NAME: $name\n COMPANY: $company\n ADDRESS: $add +ress\n CITY: $city\n STATE: $state\n ZIP: $zip\n PHONE: $phone\n FAX: + $fax\n EMAIL: $email\n COMMENTS: \n \n $comments"; attach $msg Type =>'image/gif', Path =>"$file", Filename =>"$file"; $msg->send;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: email and upload
by Jenda (Abbot) on Mar 17, 2003 at 23:23 UTC | |
by roundboy (Sexton) on Mar 18, 2003 at 05:59 UTC | |
|
Re: email and upload
by thatguy (Parson) on Mar 17, 2003 at 19:44 UTC | |
by stu96art (Scribe) on Mar 17, 2003 at 20:35 UTC | |
|
Re: email and upload
by Mr. Muskrat (Canon) on Mar 17, 2003 at 21:36 UTC |