Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems using MIME::Lite

Status
Not open for further replies.

kharybdis

Technical User
Mar 3, 2001
9
US
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=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>
<form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;/cgi-bin/try.pl&quot;>
<p> Send to:
<input type=&quot;text&quot; name=&quot;sendto&quot;>
</p>
<p>Send from:
<input type=&quot;text&quot; name=&quot;sendfrom&quot;>
</p>
<p>
<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit&quot;>
</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 &quot;Taille:&quot;,$mailHTML->size(),&quot;\n&quot;;
$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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top