summaryrefslogtreecommitdiff
path: root/fml/lib/FML
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-05-27 11:20:00 +0000
committerfukachan <fukachan>2002-05-27 11:20:00 +0000
commiteb03edfb8ba3028d1bc5db5e9aa5f4f7da40f9d5 (patch)
tree36b8671e6154b86d270e54717698760d99e4817e /fml/lib/FML
parent47a3d3bd087c8d8b24dd6858c698abd2528271e3 (diff)
downloadfml8-eb03edfb8ba3028d1bc5db5e9aa5f4f7da40f9d5.tar.gz
fml8-eb03edfb8ba3028d1bc5db5e9aa5f4f7da40f9d5.tar.bz2
fml8-eb03edfb8ba3028d1bc5db5e9aa5f4f7da40f9d5.zip
pass smtp log file handle to Mail::Delivery
Diffstat (limited to 'fml/lib/FML')
-rw-r--r--fml/lib/FML/Mailer.pm6
-rw-r--r--fml/lib/FML/Process/Distribute.pm5
2 files changed, 9 insertions, 2 deletions
diff --git a/fml/lib/FML/Mailer.pm b/fml/lib/FML/Mailer.pm
index af8f1a4a..273b384b 100644
--- a/fml/lib/FML/Mailer.pm
+++ b/fml/lib/FML/Mailer.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Mailer.pm,v 1.8 2001/12/23 11:39:44 fukachan Exp $
+# $FML: Mailer.pm,v 1.9 2002/05/22 15:59:57 fukachan Exp $
#
package FML::Mailer;
@@ -96,6 +96,7 @@ sub send
{
my ($self, $args) = @_;
my ($config, $maintainer, $fp, $sfp) = ();
+ my $handle = undef;
# $curproc is given in usual fml processes.
# but not in other programs.
@@ -105,11 +106,13 @@ sub send
$fp = sub { Log(@_);}; # pointer to the log function
$sfp = sub { my ($s) = @_; print $s; print "\n" if $s !~ /\n$/o;};
+ $handle = \*STDOUT;
my $curproc = $args->{ curproc };
my $wh = $curproc->open_outgoing_message_channel();
if (defined $wh) {
$sfp = sub { print $wh @_;};
+ $handle = $wh;
}
}
@@ -144,6 +147,7 @@ sub send
my $service = new Mail::Delivery {
log_function => $fp,
smtp_log_function => $sfp,
+ smtp_log_handle => $handle,
};
if ($service->error) { LogError($service->error); return 0;}
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 5e138590..3276c7d4 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.76 2002/05/21 15:07:31 fukachan Exp $
+# $FML: Distribute.pm,v 1.77 2002/05/27 08:51:13 fukachan Exp $
#
package FML::Process::Distribute;
@@ -389,10 +389,12 @@ sub _deliver_article
# distribute article
my $fp = sub { Log(@_);}; # pointer to the log function
my $sfp = sub { my ($s) = @_; print $s; print "\n" if $s !~ /\n$/o;};
+ my $handle = undef;
my $wh = $curproc->open_outgoing_message_channel();
if (defined $wh) {
$sfp = sub { print $wh @_;};
+ $handle = $wh;
}
if (0) { # debug
@@ -420,6 +422,7 @@ sub _deliver_article
$service = new Mail::Delivery {
log_function => $fp,
smtp_log_function => $sfp,
+ smtp_log_handle => $handle,
};
};
croak($@) if $@;