--- /home/stewart/SendEmail.pm	Thu Mar 13 12:01:50 2003
+++ perl/RT/Action/SendEmail.pm	Thu Mar 13 12:00:46 2003
@@ -114,9 +114,12 @@
 
     $self->SetHeader('To', join(',', @{$self->{'PseudoTo'}}))
       if ( (@{$self->{'PseudoTo'}}) and (! $MIMEObj->head->get('To')));
-    
+my $ticket=$self->TicketObj->Id; 
     if ($RT::MailCommand eq 'sendmailpipe') {
-	open (MAIL, "|$RT::SendmailPath $RT::SendmailArguments") || return(0);
+#SJ HACK added -f bounce+ticket-#@rt.vu.edu.au so that a bounce message
+#SJ HACK will generate comment in an apprortiate ticket. Should really get the
+#SJ HACK @domain.com part from a config file
+	open (MAIL, "|$RT::SendmailPath $RT::SendmailArguments -fbounce+ticket-$ticket\@rt.vu.edu.au") || return(0);
 	print MAIL $MIMEObj->as_string;
 	close(MAIL);
     }
