[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 7858e5d1d31f2700f1deee1d861ffc3b297d05b0

Ivan ivan at 420.am
Sat Jan 19 17:28:41 PST 2013


The branch, FREESIDE_2_3_BRANCH has been updated
       via  7858e5d1d31f2700f1deee1d861ffc3b297d05b0 (commit)
      from  3f33d55b1cbbe497c3e21c8e26356ea649119c3b (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 7858e5d1d31f2700f1deee1d861ffc3b297d05b0
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Jan 19 17:28:38 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 189b999..da9930c 100755
--- a/rt/lib/RT/Action/SendEmail.pm
+++ b/rt/lib/RT/Action/SendEmail.pm
@@ -851,6 +851,9 @@ sub SetReturnAddress {
     }
 
     unless ( $self->TemplateObj->MIMEObj->head->get('From') ) {
+
+        my $from = $replyto;
+
         if ( RT->Config->Get('UseFriendlyFromLine') ) {
             my $friendly_name = $args{friendly_name};
 
@@ -862,19 +865,22 @@ sub SetReturnAddress {
             }
 
             $friendly_name =~ s/"/\\"/g;
-            $self->SetHeader(
-                'From',
+            $from =
                 sprintf(
                     RT->Config->Get('FriendlyFromLineFormat'),
                     $self->MIMEEncodeString(
                         $friendly_name, RT->Config->Get('EmailOutputEncoding')
                     ),
                     $replyto
-                ),
-            );
-        } else {
-            $self->SetHeader( 'From', $replyto );
+                );
         }
+
+        $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 );
     }
 
     unless ( $self->TemplateObj->MIMEObj->head->get('Reply-To') ) {

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

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




More information about the freeside-commits mailing list