Can't locate object method "send" via package "GT::Mail"
(perhaps you forgot to load "GT::Mail"?) at Dbsql::Home::send_mail4 line 12.
This is the error I got.What does it mean?
I am trying to mail, with smpt.
(Admin e-mail works fine, but when I add this to home.pm
$COMPILE{send_mail4} = <<'END_OF_SUB';
sub send_mail4 { my $self = shift; use GT::Mail; GT::Mail->send (
'Content-type' => 'text/html',
sendmail => $self->{glb_cfg}->{db_mail_path},
to => 'test@test.com', #$to,
from => 'test@test.com', #$from,
subject => 'test@test.com', #$sbj,
msg => 'test' #$msg
) or die "Error: $GT::Mail::error";
return ('home.html',{
header => $self->_language('HEA_HOME'),
msg => 'Email was sent.'});
}
END_OF_SUBAbove does not work, but gives me above error ?