From: johnnyp <
[email protected]>
Yes including code and errors would have been more helpful on my
part. I am attempting to use Mail::SendMail with the following code:
#!C:\Perl\lib\mail
use strict;
use warnings;
use Mail::SendMail;
my %mail = ( To => '
[email protected]',
From => '
[email protected]',
Message => "test mail"
);
sendmail(%mail) or die $Mail::Sendmail::error;
print "OK. Log says:\n", $Mail::Sendmail::log;
__END__
The error I am getting is:
'undefined subroutine &main::sendmail called at C:perl\lib\mail
\mail.pl line 13.
The module is named Mail::Sendmail ! Notice the lowercase "m" in the
middle of "Sendmail". Perl is case sensitive even if the underlying
filesystem is not. (I do wish Perl emited a warning in such cases.)
Perl is able to find and load the ...\Mail\SendMail.pm (because the
Windows filesystem doesn't care whether you ask it for Sendmail.pm,
SendMail.pm or SENDMAIL.PM), but fails to initialize it properly ...
it tries to initialize module Mail::SendMail, but there is only
Mail::Sendmail in the file.
Jenda
=====
[email protected] ===
http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery