[Rt-commit] r9598 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Tue Nov 6 07:11:12 EST 2007


Author: ruz
Date: Tue Nov  6 07:11:11 2007
New Revision: 9598

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email.pm

Log:
 r9508 at cubic-pc (orig r9507):  sartak | 2007-10-30 22:32:45 +0300
  r44437 at onn:  sartak | 2007-10-30 15:32:20 -0400
  SendEmailUsingTemplate now has a default From of CorrespondAddress. otherwise, the from address could be anyone (including in one case the address of www-data)
 


Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email.pm	Tue Nov  6 07:11:11 2007
@@ -498,7 +498,7 @@
     return $template;
 }
 
-=head2 SendEmailUsingTemplate Template => '', Arguments => {}, To => '', Cc => '', Bcc => ''
+=head2 SendEmailUsingTemplate Template => '', Arguments => {}, From => CorrespondAddress, To => '', Cc => '', Bcc => ''
 
 Sends email using a template, takes name of template, arguments for it and recipients.
 
@@ -511,6 +511,7 @@
         To => undef,
         Cc => undef,
         Bcc => undef,
+        From => RT->Config->Get('CorrespondAddress'),
         InReplyTo => undef,
         @_
     );
@@ -525,7 +526,7 @@
     }
 
     $mail->head->set( $_ => $args{ $_ } )
-        foreach grep defined $args{$_}, qw(To Cc Bcc);
+        foreach grep defined $args{$_}, qw(To Cc Bcc From);
 
     if ( $args{'InReplyTo'} ) {
         my @id = $args{'InReplyTo'}->head->get('Message-ID');


More information about the Rt-commit mailing list