[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-mailbox
Subject:    Bounce
From:       Jeremy_Banks () tab ! co ! nz
Date:       2002-10-03 5:22:58
[Download RAW message or body]

Bounce seems to be a bit broken in 2.025.  The following script bounces the mail
messages in an mbox file to the recipient of the mail message and seems to
ignore the 'to' argument:

#!/usr/bin/perl -w

use strict;
use Mail::Box::Manager;

my $mgr = new Mail::Box::Manager;
my $mailbox_name = $ARGV[0] or die "Usage: test.pl mailbox\n";
my $mailbox = $mgr->open($mailbox_name, access => 'r') or die "Couldn't open
mailbox $mailbox_name: $!\n";

for ($mailbox->messages())
{
   print $_->subject(), "\n";
   $_->bounce(To => 'banks')->send(via => 'smtp');
}
$mgr->closeAllFolders();

__END__

I tried using the alternate syntax:
   $_->bounce(Mail::Message::Head::ResentGroup->new(To => 'banks'))->send(via =>
'smtp');

This gave me the same result but also gave me the warning:
INTERNAL: Message header required for ResentGroup
ERROR: No `Received' field specified.

I tried changing 'To' to 'to', it just seems to send it back to the message
recipient regardless.

Also there is still some debug code left in the Mail::Transport::SMTP::trySend
subroutine:
which spits out some warns.

Jeremy




**********************************************************************
This email with any attachments is confidential and may be
subject to legal privilege.  If it is not intended for you please
reply immediately, destroy it and do not copy, disclose or use
it in any way.
**********************************************************************


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic