I'm using a form to have an HTML file sent to the address entered in the form. I'm having a problem on the server side. Here is my testing HTML:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="/cgi-bin/try.pl">
<p> Send to:
<input type="text" name="sendto">
</p>
<p>Send from:
<input type="text" name="sendfrom">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
</html>
Here is the script code:
#!/usr/bin/perl
use MIME::Lite;
use MIME::Lite::HTML;
my $mailHTML = new MIME::Lite::HTML
From => 'nathan@we-are-it.com',
To => 'support@we-are-it.com',
Subject => 'test message';
$MIMEmail = $mailHTML->parse(' print "Taille:",$mailHTML->size(),"\n";
$MIMEmail->send; # or for win user : $mail->send_by_smtp('smtp.we-are-it.com');
Now, this is just for testing purposes, so I don't have the variables entered to pass from the form.
When I 'submit' the form I get these errors in httpd/error_log:
(2) No such file or directory: exec of /var/ fialed
Premature end of script headers: /var/
When I try to run the script via perl try.pl I get:
Can't locate MIME/Lite.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at try.pl line 3.
BEGIN failed--compilation aborted at try.pl line 3.
I'm guessing that I don't have Lite.pm for some reason. I've searched my drive for it, with no luck.
I went to reinstall MIME::Lite, and when I run 'make test', it gives me:
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0 test.pl
1..last_test_to_print
Can't locate LWP/UserAgent.pm in @INC (@INC contains: blib/arch blib/lib /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at blib/lib/MIME/Lite/HTML.pm line 72.
BEGIN failed--compilation aborted at blib/lib/MIME/Lite/HTML.pm line 72.
Compilation failed in require at test.pl line 11.
BEGIN failed--compilation aborted at test.pl line 11.
make: *** [test_dynamic] Error 2
Am I missing a library? This is a fresh install of RedHat 7.2, running Apache 3.19.
Any help would be appreciated.
Thanks.
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="/cgi-bin/try.pl">
<p> Send to:
<input type="text" name="sendto">
</p>
<p>Send from:
<input type="text" name="sendfrom">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
</html>
Here is the script code:
#!/usr/bin/perl
use MIME::Lite;
use MIME::Lite::HTML;
my $mailHTML = new MIME::Lite::HTML
From => 'nathan@we-are-it.com',
To => 'support@we-are-it.com',
Subject => 'test message';
$MIMEmail = $mailHTML->parse(' print "Taille:",$mailHTML->size(),"\n";
$MIMEmail->send; # or for win user : $mail->send_by_smtp('smtp.we-are-it.com');
Now, this is just for testing purposes, so I don't have the variables entered to pass from the form.
When I 'submit' the form I get these errors in httpd/error_log:
(2) No such file or directory: exec of /var/ fialed
Premature end of script headers: /var/
When I try to run the script via perl try.pl I get:
Can't locate MIME/Lite.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at try.pl line 3.
BEGIN failed--compilation aborted at try.pl line 3.
I'm guessing that I don't have Lite.pm for some reason. I've searched my drive for it, with no luck.
I went to reinstall MIME::Lite, and when I run 'make test', it gives me:
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0 test.pl
1..last_test_to_print
Can't locate LWP/UserAgent.pm in @INC (@INC contains: blib/arch blib/lib /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at blib/lib/MIME/Lite/HTML.pm line 72.
BEGIN failed--compilation aborted at blib/lib/MIME/Lite/HTML.pm line 72.
Compilation failed in require at test.pl line 11.
BEGIN failed--compilation aborted at test.pl line 11.
make: *** [test_dynamic] Error 2
Am I missing a library? This is a fresh install of RedHat 7.2, running Apache 3.19.
Any help would be appreciated.
Thanks.