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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

where and how to create Sendmail.pm on AIX 2

Status
Not open for further replies.

lsantos

Programmer
Jun 9, 2003
24
AU
I am testing a perl script to send emails based on an a db file extract. Nothing was being sent so I went on to debug the perl script and got following error:

Can't locate Mail/Sendmail.pm in @INC (@INC contains: /usr/local/lib/perl5/5.6.0/aix /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/aix /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl /usr/opt/perl5/lib/5.6.0/aix /usr/opt/perl5/lib/5.6.0 /usr/sbin/rsct/perl5/lib/site_perl /usr/opt/perl5/lib/site_perl/5.005/aix /usr/opt/perl5/lib/site_perl/5.005 /usr/opt/perl5/lib/site_perl /usr/opt/perl5/lib .) at eft line 5.
BEGIN failed--compilation aborted at eft line 5.

Then looked for Sendmail.pm on the server and cannot find it?

The question is where should I create this file and what parameters/settings should it contain?
 
Try

use Mail::SendMail;

Not

use Mail::Sendmail;

If you could post the script it would be useful



Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant.
 
This may be of use

#! /usr/local/bin/perl

use Mail::SendMail;

&NotifyParis;

sub NotifyParis {

fromuser = 'Notification Bot';
$to = 'a@b.com';
$subject = "A test script";
$messagebody = "If you get this the script has worked."
&send_mail ($fromuser, $to, $subject, $messagebody)
}

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant.
 
mrn,

Thank you for your reply. I did change my script to SendMail and tried to debug again and I still get the same error.

Any ideas?

test script
===========

[Live:authprog] cat test
#! /usr/local/bin/perl

use Mail::SendMail;

&NotifyMe;

sub NotifyMe {

$fromuser = 'Test SendMail';
$to = 'luis.santos@byron.nsw.gov.com';
$subject = "A test script";
$messagebody = "If you get this the script has worked."
&send_mail ($fromuser, $to, $subject, $messagebody)
}

execution
===========

[Live:authprog] ./test
Can't locate Mail/SendMail.pm in @INC (@INC contains: /usr/local/lib/perl5/5.6.0/aix /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/aix /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl /usr/opt/perl5/lib/5.6.0/aix /usr/opt/perl5/lib/5.6.0 /usr/sbin/rsct/perl5/lib/site_perl /usr/opt/perl5/lib/site_perl/5.005/aix /usr/opt/perl5/lib/site_perl/5.005 /usr/opt/perl5/lib/site_perl /usr/opt/perl5/lib .) at ./test line 3.
BEGIN failed--compilation aborted at ./test line 3.
[Live:authprog]

 
Have you searched for the sendmail.pm file on your system, looks like the Perl path may not be correct

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant.
 
Mail::Sendmail (note the case) is not part of perl's base distribution, it has to be installed. You can read about the module, as well as download it, here on CPAN.

Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Our network management system requires us to correctly setup SNMP so that the device can be correctly identified and the relevant support team notified.

On one node of our two node HACMP cluster, SNMP seems to return blanks for everything I query included SysDescr which should something like..
IBM PowerPC CHRP Computer.Machine....
On the other node, the SysDescr returns correctly together with all the other SysInfo mib variables.

Already tried restarting the snmpd.
I've checked and both snmpdv3.conf files are exactly the same, same version (AIX 5.2 ML3).. even did a "sum" of the conf file and the snmpd and it all matched up.
Not sure if it would make a difference, but both these machines were upgraded from AIX 4.3.3

Any ideas?

TIA.. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top