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;
In reply to How to attach the attachments? by gube
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |