[freeside-commits] branch master updated. dc45b8bd747e8e61b4318f0b3c7be7a8be739aa9

Ivan ivan at 420.am
Sat Jan 19 17:05:48 PST 2013


The branch, master has been updated
       via  dc45b8bd747e8e61b4318f0b3c7be7a8be739aa9 (commit)
      from  4c775d58b5dbb4fae05f303a612c781eaaf3a56f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dc45b8bd747e8e61b4318f0b3c7be7a8be739aa9
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Jan 19 17:05:43 2013 -0800

    set Sender: like From: to avoid Outlook drain bramage, RT#20825

diff --git a/rt/lib/RT/Action/SendEmail.pm b/rt/lib/RT/Action/SendEmail.pm
index 2a7a2e3..1e6607e 100755
--- a/rt/lib/RT/Action/SendEmail.pm
+++ b/rt/lib/RT/Action/SendEmail.pm
@@ -871,21 +871,25 @@ sub SetFrom {
     my $self = shift;
     my %args = @_;
 
+    my $from = $args{From};
+
     if ( RT->Config->Get('UseFriendlyFromLine') ) {
         my $friendly_name = $self->GetFriendlyName(%args);
-        $self->SetHeader(
-            'From',
+        $from = 
             sprintf(
                 RT->Config->Get('FriendlyFromLineFormat'),
                 $self->MIMEEncodeString(
                     $friendly_name, RT->Config->Get('EmailOutputEncoding')
                 ),
                 $args{From}
-            ),
-        );
-    } else {
-        $self->SetHeader( 'From', $args{From} );
+            );
     }
+
+    $self->SetHeader( 'From', $from );
+
+    #also set Sender:, otherwise MTAs add a nonsensical value like rt at machine,
+    #and then Outlook prepends "rt at machine on behalf of" to the From: header
+    $self->SetHeader( 'Sender', $from );
 }
 
 =head2 GetFriendlyName

-----------------------------------------------------------------------

Summary of changes:
 rt/lib/RT/Action/SendEmail.pm |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)




More information about the freeside-commits mailing list