http://qs321.pair.com?node_id=1213098

tultalk has asked for the wisdom of the Perl Monks concerning the following question:

Hi: Sendmail installed on host at use lib qw(/usr/bin/perl); I installed Sendmail in local subdir perl/mail and set use lib qw(/home/bmllcom/public_html/httpsdocs/cgi-bin/lib/perl/); use Mail::Sendmail; When I call sendmail it call the fucntion in the usr/bin/perl package. How do I force the call to go to my local copy of sendmail? Thanks

Replies are listed 'Best First'.
Re: perl module Sendmail location
by marto (Cardinal) on Apr 18, 2018 at 05:11 UTC

    Mail::Sendmail doesn't interact with or require a command line sendmail program. It uses SMTP. The documentation shows how to configure it.

    Update::

    " I installed Sendmail..."

    Do you mean to say you installed the perl module Mail:Sendmail, not Sendmail?

      Did not "install" Mail::Sendmail. I copied Sendmail to local dir (below). Got it working: Changed name to sendMail and function call to SendMail.

      use lib qw(/home/bondocom/public_html/httpsdocs/cgi-bin/lib/perl/);

      use Mail::sendMail;

      Works fine. Now to get encryption "working fine". Using free certs from Comodo.

      Often go to bed with problem and wake up with solution

      Should wait until mornings to post questions

        "Often go to bed with problem and wake up with solution"

        I know the feeling :) This isn't intended to be a criticism, but based on following a few of your threads, you seem to be making life unnecessarily difficult for yourself at times. I don't know the exact constraints of your setup, however check out local::lib, cpanm and local::lib would let you install & maintain modules from cpan to a local directory, while being quick and easy to use.

Re: perl module Sendmail location
by huck (Prior) on Apr 18, 2018 at 06:35 UTC

    Just where did you install it? full path starting with a slash please

    I installed Sendmail in local subdir perl/mail
    this sounds like you installed it to /home/bmllcom/perl/mail. if so then it would be

    use lib qw(/home/bmllcom/perl);