[Rt-commit] r14343 - in rt/3.8/trunk: .
spang at bestpractical.com
spang at bestpractical.com
Mon Jul 21 18:03:38 EDT 2008
Author: spang
Date: Mon Jul 21 18:03:37 2008
New Revision: 14343
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/lib/RT/Interface/Email.pm
Log:
r46841 at loki: spang | 2008-07-21 23:01:16 +0100
output mail to tempfile instead of default /mailer.testfile when using the 'testfile'
Modified: rt/3.8/trunk/lib/RT/Interface/Email.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Interface/Email.pm (original)
+++ rt/3.8/trunk/lib/RT/Interface/Email.pm Mon Jul 21 18:03:37 2008
@@ -56,6 +56,7 @@
use RT::EmailParser;
use File::Temp;
use UNIVERSAL::require;
+use Mail::Mailer ();
BEGIN {
use base 'Exporter';
@@ -374,6 +375,10 @@
my $mail_command = RT->Config->Get('MailCommand');
+ if ($mail_command eq 'testfile') {
+ $Mail::Mailer::testfile::config{outfile} = File::Temp->new;
+ }
+
# if it is a sub routine, we just return it;
return $mail_command->($args{'Entity'}) if UNIVERSAL::isa( $mail_command, 'CODE' );
More information about the Rt-commit
mailing list