johnnyp wrote:
I am attempting to use Mail::SendMail with the following code:

#!C:\Perl\lib\mail

use strict;
use warnings;
use Mail::SendMail;
----------------^
Case matters, even if you are on Windows.

  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.

As best I can tell this error is actually popping up from the
sendmail.pm subroutine sub sendmail. But I could be mistaken.

You are; see my remark above.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to