[Rt-commit] r15769 - rt/3.8/trunk/lib/RT/Action

ruz at bestpractical.com ruz at bestpractical.com
Thu Sep 4 19:13:06 EDT 2008


Author: ruz
Date: Thu Sep  4 19:13:00 2008
New Revision: 15769

Modified:
   rt/3.8/trunk/lib/RT/Action/SendEmail.pm

Log:
* :retab
* minors

Modified: rt/3.8/trunk/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Action/SendEmail.pm	(original)
+++ rt/3.8/trunk/lib/RT/Action/SendEmail.pm	Thu Sep  4 19:13:00 2008
@@ -102,7 +102,6 @@
 sub Commit {
     my $self = shift;
 
-
     $self->DeferDigestRecipients() if RT->Config->Get('RecordOutgoingEmail');
     my $message = $self->TemplateObj->MIMEObj;
 
@@ -190,7 +189,7 @@
         && $self->{$header}
         && @{ $self->{$header} } );
 }
-    # PseudoTo	(fake to headers) shouldn't get matched for message recipients.
+    # PseudoTo (fake to headers) shouldn't get matched for message recipients.
     # If we don't have any 'To' header (but do have other recipients), drop in
     # the pseudo-to header.
     $self->SetHeader( 'To', join( ', ', @{ $self->{'PseudoTo'} } ) )
@@ -313,18 +312,18 @@
     );
 
      
-    return $status unless ($status > 0 || exists ($self->{'Deferred'}));;
+    return $status unless ($status > 0 || exists $self->{'Deferred'});
 
     my $success = $msgid . " sent ";
     foreach (@EMAIL_RECIPIENT_HEADERS) {
         my $recipients = $MIMEObj->head->get($_);
         $success .= " $_: " . $recipients if $recipients;
     }
-	
-    
+
     if( exists $self->{'Deferred'} ) {
         for (qw(daily weekly susp)) {
-            $success .= "\nBatched email $_ for: ". join(", ",keys % {$self->{'Deferred'}->{$_}} ) if (exists $self->{'Deferred'}->{$_});
+            $success .= "\nBatched email $_ for: ". join(", ", keys %{ $self->{'Deferred'}{ $_ } } )
+                if exists $self->{'Deferred'}{ $_ };
         }
     }
 
@@ -697,19 +696,21 @@
 
 
     
-sub  RecordDeferredRecipients {
-	my $self = shift;
-	my $txn_id = $self->{'OutgoingMailTransaction'};
-	return unless $txn_id;
-	
-	my $txn_obj = RT::Transaction->new( $self->CurrentUser );
-	$txn_obj->Load( $txn_id );
-    my( $ret, $msg ) = $txn_obj->AddAttribute( Name => 'DeferredRecipients',
-					      Content => $self->{'Deferred'});
-	$RT::Logger->warning( "Unable to add deferred recipients to outgoing transaction: $msg" ) 
-	    unless $ret;
+sub RecordDeferredRecipients {
+    my $self = shift;
+    my $txn_id = $self->{'OutgoingMailTransaction'};
+    return unless $txn_id;
+
+    my $txn_obj = RT::Transaction->new( $self->CurrentUser );
+    $txn_obj->Load( $txn_id );
+    my( $ret, $msg ) = $txn_obj->AddAttribute(
+        Name => 'DeferredRecipients',
+        Content => $self->{'Deferred'}
+    );
+    $RT::Logger->warning( "Unable to add deferred recipients to outgoing transaction: $msg" ) 
+        unless $ret;
 
-        return ($ret,$msg);
+    return ($ret,$msg);
 }
 
 =head2 SquelchMailTo [@ADDRESSES]


More information about the Rt-commit mailing list