adding debug warnings

This commit is contained in:
Martin Kamerbeek 2010-05-27 16:19:10 +02:00
parent 573813f5ee
commit 8568de3f32

View file

@ -34,9 +34,11 @@ unless ( $configFile && $validCommand ) {
}
else {
my $session = WebGUI::Session->open($webguiRoot,$configFile);
$session->log->warn( 'valid bounce address' );
my $email = WebGUI::Mailing::Email->new( $session, $session->id->fromHex( $mailId ) );
if ($email) {
$session->log->warn( 'found email' );
my $dsr = Mail::DeliveryStatus::BounceParser->new( \*STDIN );
my $report = ( $dsr->reports )[0];
@ -44,6 +46,7 @@ else {
my $message = $report->get( 'reason' );
$message =~ s{\s+}{ }g;
$session->log->warn( 'about to register as bounced' );
$email->registerBounced( $reason, $message );
}
else {