[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] SMTP.pm problems




  I'm trying to use SMTP.pm with the following sample program:

    use Net::SMTP;
    $smtp =3D Net::SMTP->new('smtp.itd.umich.edu');
    print $smtp->domain,"\n";
    $smtp->quit;

  The syntax checks fine, but when I try to run it I get the following
error:
# Can't locate object method "SUPER::new" via package "Net::SMTP".
File 'Zip 100:Perl:MacPerl 5.1.0r2?:lib:Net:SMTP.pm'; Line 223


  Here is the line that it's having problems with:
 my $obj =3D $type->SUPER::new(PeerAddr =3D> $host, 


  And here is the rest of the new subroutine:
sub new
{
 my $self =3D shift;
 my $type =3D ref($self) || $self;
 my $host =3D shift;
 my %arg  =3D @_; 
 my $obj =3D $type->SUPER::new(PeerAddr =3D> $host, 
                             PeerPort =3D> $arg{Port} || 'smtp(25)',
                             Proto    =3D> 'tcp',
                             Timeout  =3D> defined $arg{Timeout}
                                                ? $arg{Timeout}
                                                : 120
                            ) or return undef;
 $obj->autoflush(1);
 $obj->debug(exists $arg{Debug} ? $arg{Debug} : undef);
 unless ($obj->response() =3D=3D CMD_OK)
  {
   $obj->SUPER::close();
   return undef;
  }
 ${*$obj}{'net_smtp_host'} =3D $host;
 (${*$obj}{'net_smtp_domain'}) =3D $obj->message =3D~ /\A\s*(\S+)/;
 $obj->hello($arg{Hello} || "");
 $obj;
}



  I really have no idea why it isn't working. I think I have all the
libraries added that I need to add. I'm using MacPerl 5.1.0r2.


any ideas? Has anyone gotten SMTP.pm to work?

rob
--
<mailto: "Robert A. Decker" comrade@umich.edu>
Programmer Analyst - Health Media Research Lab
University of Michigan Comprehensive Cancer Center 

"Get A Life" quote #14: "Boy, this is like a dream come true! First I
get an incredibly gorgeous genius girlfriend, and then I get to be an
experimental Guinea pig! No offense to our Italian friends." 
-Chris Elliott