[Rt-devel] mails to empty list, 3.2
Alex Vandiver
alexmv at bestpractical.com
Wed Jul 14 11:23:41 EDT 2004
On Mon, 2004-07-12 at 19:48, matthew zeier wrote:
> Are Hans and I the only ones with this problem? Free beer to anyone who can
> help me find a fix to this.
I just ran into this, and spent a minute poking at it. The
FriendlyToLine is pushed onto the To: line if there isn't anything
there, regardless if there are recipients in the Cc or Bcc. Later, when
the check of "does this have recipients" rolls around, there's nothing
in the Cc or Bcc, but the FriendlyToLine in the To, so.. off it goes!
I have fixed the problem in svn; it should be in the next 3.2
release. If you're itching to fix it now, applying the following should
work.
- Alex
Index: lib/RT/Action/SendEmail.pm
===================================================================
--- lib/RT/Action/SendEmail.pm (revision 1228)
+++ lib/RT/Action/SendEmail.pm (working copy)
@@ -116,10 +116,11 @@
if ( !$MIMEObj->head->get('Bcc') && $self->{'Bcc'} && @{ $self->{'Bcc'} } );
# PseudoTo (fake to headers) shouldn't get matched for message recipients.
- # If we don't have any 'To' header, drop in the pseudo-to header.
+ # If we don't have any 'To' header (but do have other recipients), drop in
+ # the pseudo-to header.
$self->SetHeader( 'To', join ( ', ', @{ $self->{'PseudoTo'} } ) )
if ( $self->{'PseudoTo'} && ( @{ $self->{'PseudoTo'} } )
- and ( !$MIMEObj->head->get('To') ) );
+ and ( !$MIMEObj->head->get('To') ) ) and ( $MIMEObj->head->get('Cc') or $MIMEObj->head->get('Bcc'));
# We should never have to set the MIME-Version header
$self->SetHeader( 'MIME-Version', '1.0' );
--
Networking -- one letter away from not working
More information about the Rt-devel
mailing list