gube has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
I use this below cgi form after submitting the mail entry detail form. Here, if only send message means it properly sending no problem. If i use attachments in the form also it sending from my local system cgi file. I use this cgi files in the my webserver and i attached the attachment in the local server means it's not working. How can i change the code please provide.
#!/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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to attach the attachments?
by johnnywang (Priest) on Jun 03, 2005 at 05:40 UTC | |
|
Re: How to attach the attachments?
by monarch (Priest) on Jun 03, 2005 at 04:04 UTC | |
|
Re: How to attach the attachments?
by Fletch (Bishop) on Jun 03, 2005 at 04:14 UTC | |
|
Re: How to attach the attachments?
by gube (Parson) on Jun 03, 2005 at 04:26 UTC | |
by perl_devel (Friar) on Jun 03, 2005 at 05:50 UTC | |
by monarch (Priest) on Jun 03, 2005 at 04:46 UTC | |
|
Re: How to attach the attachments?
by kwaping (Priest) on Jun 03, 2005 at 14:43 UTC |