Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 15993
Status: resolved
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: nakasiro [...] sdl.hitachi.co.jp
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.19
Fixed in: (no value)



Subject: Excessive message in $SMTP->message after $SMTP->dataEnd()
While making a smtp debug program, a problem is occurred. After $smtp->dateEnd(), I have an excessive message($smtp->message()) list below. $smtp->dataSend('......'); $smtp->message() = 0. Enter mail, end with "." on a line by itself. $smtp->dataEnd(); $smtp->message() = 1. Enter mail, end with "." on a line by itself. [EXCESS] 2. Message accepted for delivery. I'd like to have only line 2. but I have 1. and 2. I'm afraid the line 1. is the result of $smtp->dataSend(), line 0. libinet 1.19 perl 5.8.7 on Linux and SunOS 5.9
From: Graham Barr <gbarr [...] pobox.com>
Subject: Re: [cpan #15993] Excessive message in $SMTP->message after $SMTP->dataEnd()
Date: Thu, 24 Nov 2005 07:50:46 -0600
To: bug-libnet [...] rt.cpan.org
RT-Send-Cc:
On Nov 21, 2005, at 2:40 AM, Guest via RT wrote: Show quoted text
> While making a smtp debug program, a problem is occurred. > > After $smtp->dateEnd(), I have an excessive message($smtp->message > ()) list below. > > $smtp->dataSend('......'); > $smtp->message() = > 0. Enter mail, end with "." on a line by itself. > > $smtp->dataEnd(); > $smtp->message() = > 1. Enter mail, end with "." on a line by itself. [EXCESS] > 2. Message accepted for delivery. > > I'd like to have only line 2. but I have 1. and 2. > > I'm afraid the line 1. is the result of $smtp->dataSend(), line 0.
Yes. Call ->message in a list context and each line will be returned separately. Then just look at the last one. Or even $mesg = ($smtp->message)[-1]; Graham.