Skip Menu |

This queue is for tickets about the MIME-Lite CPAN distribution.

Report information
The Basics
Id: 3900
Status: new
Priority: 0/
Queue: MIME-Lite

People
Owner: Nobody in particular
Requestors: vek [...] pharmapartners.nl
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 3.01_02
Fixed in: (no value)



Subject: The server's reply to DATAEND may be a usefull result to return from send_by_smtp
If there are no objections I would like send_by_smtp to return the last code and message returned from the SMTP server after dataend. This message often contains a queue id which might be usefull if you ever need to trace the message in the server's log files. Villy
From: vek [...] pharmapartners.nl
[guest - Mon Sep 29 10:21:34 2003]: Show quoted text
> If there are no objections I would like send_by_smtp to return > the last code and message returned from the SMTP server after > dataend. This message often contains a queue id which might be > usefull if you ever need to trace the message in the server's log > files. > > Villy
diff -u MIME-Lite-3.01_02/lib/MIME/Lite.pm.orig MIME-Lite-3.01_02/lib/MIME/Lite.pm The attached patch appearently didn't get attached, so here it is. --- MIME-Lite-3.01_02/lib/MIME/Lite.pm.orig Thu Aug 28 19:58:10 2003 +++ MIME-Lite-3.01_02/lib/MIME/Lite.pm Mon Sep 29 15:43:50 2003 @@ -2721,8 +2721,9 @@ or Carp::croak( "Net::CMD (Net::SMTP) DATAEND command failed.\n". "Last server message was:" . $smtp->message . "This probably represents a problem with newline encoding " ); + my $retval = join ' ', $smtp->code, ($smtp->message)[-1]; $smtp->quit; - 1; + return $retval; } #------------------------------