diff options
| author | fukachan <fukachan> | 2001-05-18 10:39:28 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-05-18 10:39:28 +0000 |
| commit | 7bdf87ea81882e7139521ba217c941bd8ee03634 (patch) | |
| tree | b07aac3aff57a36d0c5d2d73ac3facf16728a8c4 /fml/lib/FML/Process | |
| parent | 32706d34eda4bc289364b64ae3f577def4b0d366 (diff) | |
| download | fml8-7bdf87ea81882e7139521ba217c941bd8ee03634.tar.gz fml8-7bdf87ea81882e7139521ba217c941bd8ee03634.tar.bz2 fml8-7bdf87ea81882e7139521ba217c941bd8ee03634.zip | |
prepare queue_dir/info/{sender,recipients}/ directory to control
envelope information.
To set the information, queue->set(key, value) method is used.
FML::Process::QueueManager class is a prototype to send queues in
queue_dir/.
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 4 | ||||
| -rw-r--r-- | fml/lib/FML/Process/QueueManager.pm | 66 |
2 files changed, 69 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index 4ecd18da..bb6b1da1 100644 --- a/fml/lib/FML/Process/Kernel.pm +++ b/fml/lib/FML/Process/Kernel.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: Kernel.pm,v 1.43 2001/05/05 03:56:09 fukachan Exp $ +# $FML: Kernel.pm,v 1.44 2001/05/16 11:25:49 fukachan Exp $ # package FML::Process::Kernel; @@ -602,6 +602,8 @@ sub _queue_in use Mail::Delivery::Queue; my $queue_dir = $config->{ mqueue_dir }; my $queue = new Mail::Delivery::Queue { directory => $queue_dir }; + $queue->set('sender', $maintainer); + $queue->set('recipients', [ $recipient ]); $queue->in( $msg ); $queue->setrunnable(); } diff --git a/fml/lib/FML/Process/QueueManager.pm b/fml/lib/FML/Process/QueueManager.pm new file mode 100644 index 00000000..95cc1254 --- /dev/null +++ b/fml/lib/FML/Process/QueueManager.pm @@ -0,0 +1,66 @@ +#-*- perl -*- +# +# Copyright (C) 2001 Ken'ichi Fukamachi +# All rights reserved. This program is free software; you can +# redistribute it and/or modify it under the same terms as Perl itself. +# +# $FML$ +# + +package FML::Process::QueueManager; + +use strict; +use Carp; + +=head1 NAME + +FML::Process::QueueManager - provide queue manipulation functions + +=head1 SYNOPSIS + + use FML::Process::QueueManager; + +=head1 DESCRIPTION + +=cut + +use FML::Log qw(Log LogWarn LogError); + +sub send +{ + my ($self, $queuefile) = @_; + + use Mail::Message; + my $msg = Mail::Message->parse( { file => $queuefile } ); + + use FML::Mailer; + my $obj = new FML::Mailer; + my ($sender, $rcpt); + $obj->send( { + sender => $sender, + recipient => $rcpt, + message => $msg, + }); +} + + +=head1 AUTHOR + +Ken'ichi Fukamachi + +=head1 COPYRIGHT + +Copyright (C) 2001 Ken'ichi Fukamachi + +All rights reserved. This program is free software; you can +redistribute it and/or modify it under the same terms as Perl itself. + +=head1 HISTORY + +FML::Process::QueueManager appeared in fml5 mailing list driver package. +See C<http://www.fml.org/> for more details. + +=cut + + +1; |
