We are running this program on a Linux server, but I don't think the platform
should make any difference. Hopefully you can help.

When we run a simple perl mail program using the "Mail::Mailer" module, we get
the following error:

[root@pathfiles dulin]# perl mail.pl
Can't exec "/usr/bin/Mail -I": No such file or directory at
/usr/lib/perl5/site_perl/5.6.1/Mail/Mailer/sendmail.pm line 16.

No such file or directory at 

/usr/lib/perl5/site_perl/5.6.1/Mail/Mailer.pm line 290.

What is interesting about this is that we can run the same exact perl program
on another server, and it runs fine.  The only difference is that on the server
where the program works, we are running perl 5.6.0 vs 5.6.1, and the version of
"MailTools" is different.  

On the server where we have 5.6.1 running, we just installed the "Mail::Mailer:
module with CPAN, and the installation went OK.  Again, the only difference
seems to be that the perl and "Mail" modules are different.

Here are some screen shots of what is on each server:

Server #1 running PERL  5.6.0
--------------------------------
[root@pathfiles dulin]# locate sendmail.pm
/root/.cpan/build/MailTools-1.46/Mail/Mailer/sendmail.pm
/root/.cpan/build/MailTools-1.46/blib/lib/Mail/Mailer/sendmail.pm
/root/.cpan/build/MailTools-1.44/Mail/Mailer/sendmail.pm
/root/.cpan/build/MailTools-1.44/blib/lib/Mail/Mailer/sendmail.pm
/usr/lib/perl5/site_perl/5.6.0/Mail/Mailer/sendmail.pm

Server # 2 running PERL 5.6.1

[root@pathfiles dulin]# perl mail.pl
Can't exec "/usr/bin/Mail -I": No such file or directory at 

/usr/lib/perl5/site_perl/5.6.1/Mail/Mailer/sendmail.pm line 16.

No such file or directory at 

/usr/lib/perl5/site_perl/5.6.1/Mail/Mailer.pm line 290.

[root@pathfiles CPAN-1.63]# find / -name sendmail.pm
/root/.cpan/build/MailTools-1.50/Mail/Mailer/sendmail.pm
/root/.cpan/build/MailTools-1.50/blib/lib/Mail/Mailer/sendmail.pm
find: /proc/25464/fd: No such file or directory
/usr/lib/perl5/site_perl/5.6.1/Mail/Mailer/sendmail.pm



[root@pathfiles CPAN-1.63]# find / -name Mail
/root/.cpan/build/MailTools-1.50/Mail
/root/.cpan/build/MailTools-1.50/blib/lib/auto/Mail
/root/.cpan/build/MailTools-1.50/blib/lib/Mail
/root/.cpan/build/MailTools-1.50/blib/arch/auto/Mail
find: /proc/25464/fd: No such file or directory
/usr/bin/Mail
/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Mail
/usr/lib/perl5/site_perl/5.6.1/auto/Mail
/usr/lib/perl5/site_perl/5.6.1/Mail

Here is the source of the "sendmail.pm" program:

package Mail::Mailer::sendmail;
use vars qw(@ISA);
require Mail::Mailer::rfc822;
@ISA = qw(Mail::Mailer::rfc822);


sub exec {
    my($self, $exe, $args, $to) = @_;
    # Fork and exec the mailer (no shell involved to avoid risks)

    # We should always use a -t on sendmail so that Cc: and Bcc: work
    #  Rumor: some sendmails may ignore or break with -t (AIX?)
    # Chopped out the @$to arguments, because -t means
    # they are sent in the body, and postfix complains if they
    # are also given on comand line.
        exec( $exe, '-t', @$args );
}

The "Mailer.pm" source is just too big to include at this point.

Thanks,
Kathy

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to