Subject: | BUG in Net::SMTP / Net::Cmd |
Date: | Sat, 4 Jul 2009 09:39:33 +0100 (BST) |
To: | bug-libnet [...] rt.cpan.org |
From: | John Sargent <john [...] j-bg.co.uk> |
Consider the code snippet:
my $smtp = Net::SMTP->new(
$mx,
Port => $port,
Timeout => 60,
Hello => "foo.bar"A,
Debug => exists $ENV{DEBUG} ? 1 : 0
);
$smtp->mail($from);
$smtp->to($to);
$smtp->data();
$smtp->datasend($message);
$smtp->dataend();
If I now call $smtp->code() , I get "250" back as expected (assuming the
message was delivered ok), but if I call $smtp->message(), I get a text
string that includes the text from the data() command as well as the
response from the dataend(). That is, the text returned says
'Enter mail, end with "." on a line by itself. Requested mail action
okay, completed.'
rather than
'Requested mail action okay, completed. '
as I would expect.
Perl verson 5.8.5
Net::Cmd version: 2.26
Net::SMTP version: 2.29
O/S Centos 5.1