[Rt-commit] r12105 - in rt/branches/3.6-RELEASE: .

elacour at bestpractical.com elacour at bestpractical.com
Tue May 6 09:40:49 EDT 2008


Author: elacour
Date: Tue May  6 09:40:49 2008
New Revision: 12105

Modified:
   rt/branches/3.6-RELEASE/   (props changed)
   rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm

Log:
 r8765 at datura:  manu | 2008-05-06 15:40:31 +0200
 RT-Ticket: 7765
 RT-Status: resolved
 RT-Update: correspond
 
 * switch from send (call of Mail::Mailer from Mail::Internet) to smtpsend (call
   of Net::SMTP from Mail::Internet) when $RT::MailCommand eq 'smtp' to fix
   handling of multiples To.
 


Modified: rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm	Tue May  6 09:40:49 2008
@@ -352,6 +352,7 @@
     }
     else {
         my @mailer_args = ($RT::MailCommand);
+        my $method = 'send';
 
         local $ENV{MAILADDRESS};
 
@@ -360,14 +361,15 @@
         }
         elsif ( $RT::MailCommand eq 'smtp' ) {
             $ENV{MAILADDRESS} = $RT::SMTPFrom || $MIMEObj->head->get('From');
-            push @mailer_args, ( Server => $RT::SMTPServer );
-            push @mailer_args, ( Debug  => $RT::SMTPDebug );
+            push @mailer_args, ( Host  => $RT::SMTPServer );
+            push @mailer_args, ( Debug => $RT::SMTPDebug );
+            $method = 'smtpsend';
         }
         else {
             push @mailer_args, $RT::MailParams;
         }
 
-        unless ( $MIMEObj->send(@mailer_args) ) {
+        unless ( $MIMEObj->$method(@mailer_args) ) {
             $RT::Logger->crit( $msgid . "Could not send mail." );
             return (0);
         }


More information about the Rt-commit mailing list