#!/usr/bin/perl use CGI qw(:standard); use MIME::Lite; my $q = CGI->new; print $q->header; print $q->start_html(-title=>"second document"); my $from = $q->param('textfield1'); my $to = $q->param('textfield2'); my $cc = $q->param('textfield3'); my $bcc = $q->param('textfield4'); my $subject = $q->param('textfield5'); my $data = $q->param('textarea1'); $msg = MIME::Lite->new( From => $from, To => $to, Cc => $cc, Bcc => $bcc, Subject => $subject, Data => $data ); $msg->attach( Type => "AUTO", Path => "/home/test/perl.ppt", Filename => "perl.ppt" ); $msg->send; print "Mail has been send to $to OK"; print $q->end_html;