Google Answers Logo
View Question
 
Q: Perl Sendmail ( Answered,   0 Comments )
Question  
Subject: Perl Sendmail
Category: Computers > Programming
Asked by: uniquorn1-ga
List Price: $4.00
Posted: 12 Oct 2002 11:26 PDT
Expires: 11 Nov 2002 10:26 PST
Question ID: 75771
Not sure how to incorporate the path to sendmail which is /usr/lib/sendmail

The program is not finding it as it is below.

The script I am testing is:
#! /usr/local/bin/perl

use Mail::Sendmail;

&NotifyParis;

sub NotifyParis {
	
            fromuser = 'Notification Bot'; 
            $to = 'res1b78a@verizon.net';
            $subject = "Notification Membership Lead";
            $messagebody = "Message to notify Paris of new membership lead."
            &send_mail ($fromuser, $to, $subject, $messagebody)
	}

Request for Question Clarification by twitch-ga on 12 Oct 2002 12:38 PDT
uniqorn-

Thanks for the question. Could you please let us know which version of
SendMail.pm you are using and give us any error messages that you are
receiving? Thank you.
Answer  
Subject: Re: Perl Sendmail
Answered By: jeanluis-ga on 13 Oct 2002 14:34 PDT
 
Ok here is what I did: I cut and paste your script and saved it on my
computer running linux. Then I just went out and downloaded the latest
version of SendMail.pm. And then I tried to get the script to run, and
here is what happened:
Can't locate Mail/Sendmail.pm in @INC (@INC contains:
/usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i386-linux
/usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux
/usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at
./mytest.pl line 3.
BEGIN failed--compilation aborted at ./mytest.pl line 3.


Then I changed the m in Sendmail to an M and it got a little further
(and started barking about the syntax error on the first line of the
subroutine, which I assume you can figure out) So basically my fix was
the following:

#! /usr/local/bin/perl 
   
  use Mail::SendMail; 
  
Let me know if this solves your problem, or if you need anything else.
Thanks
--jld
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy