Subject: | Bug in example program |
In the example program for Net::Server::Mail::SMTP, there doesn't seem
to be an add_queue function for which the example program calls. Here is
the snippet:
# snip
sub queue_message
{
my ($session, $data) = @_;
my $sender = $session->get_sender ();
my @ recipients = $session->get_recipients ();
return (0, 554, 'Error: no valid recipients') unless (@recipients);
my $msgid = add_queue ($sender, \@recipients, $data) or return (0);
return (1, 250, "message queued $msgid");
}
# end
When run and it gets to that step, usually the DATA command, this error
happens:
--Begin
$ perl smtp-test.pl
Undefined subroutine &main::add_queue called at smtp-test.pl line 53,
<GEN1> line 8.
Net::Server::Mail::callback('Net::Server::Mail::SMTP=HASH(0x81939c4)',
'DATA', 'SCALAR(0x8243ec8)') called at
/usr/local/share/perl/5.8.4/Net/Server/Mail.pm line 233
Net::Server::Mail::make_event('Net::Server::Mail::SMTP=HASH(0x81939c4)',
'name', 'DATA', 'arguments', 'ARRAY(0x82fc2c0)', 'success_reply',
'ARRAY(0x82fc2d8)') called at
/usr/local/share/perl/5.8.4/Net/Server/Mail/SMTP.pm line 620
Net::Server::Mail::SMTP::data_finished('Net::Server::Mail::SMTP=HASH(0x81939c4)',
'') called at /usr/local/share/perl/5.8.4/Net/Server/Mail/SMTP.pm line 595
Net::Server::Mail::SMTP::data_part('Net::Server::Mail::SMTP=HASH(0x81939c4)',
'.\x{d}\x{a}') called at /usr/local/share/perl/5.8.4/Net/Server/Mail.pm
line 443
Net::Server::Mail::tell_next_input_method('Net::Server::Mail::SMTP=HASH(0x81939c4)',
'.\x{d}\x{a}') called at /usr/local/share/perl/5.8.4/Net/Server/Mail.pm
line 508
Net::Server::Mail::process('Net::Server::Mail::SMTP=HASH(0x81939c4)')
called at smtp-test.pl line 18
--End
I'm using Net::Server::Mail::SMTP v0.13, and perl: "v5.8.4 built for
i386-linux-thread-multi" on Linux 2.6.10.
Any help would be much appreciated.
Sean