[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;
}
#------------------------------