serge       02/04/04 21:22:29

  Modified:    src/java/org/apache/james James.java
  Log:
  Patch from Jeff Keyser <[EMAIL PROTECTED]>.  Changes the bounce to check for a 
return-path header, and if there is one, have it go to that address instead of however 
JavaMail is figuring out who to send it to.  Should probably be fixed in JavaMail, but 
who cares, eh?
  
  Revision  Changes    Path
  1.20      +7 -2      jakarta-james/src/java/org/apache/james/James.java
  
  Index: James.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/James.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- James.java        27 Feb 2002 05:05:53 -0000      1.19
  +++ James.java        5 Apr 2002 05:22:29 -0000       1.20
  @@ -55,8 +55,8 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Charles Benett</a>
    *
   
  - * This is $Revision: 1.19 $
  - * Committed on $Date: 2002/02/27 05:05:53 $ by: $Author: serge $
  + * This is $Revision: 1.20 $
  + * Committed on $Date: 2002/04/05 05:22:29 $ by: $Author: serge $
   
    */
   public class James
  @@ -347,6 +347,11 @@
           MimeMessage orig = mail.getMessage();
           //Create the reply message
           MimeMessage reply = (MimeMessage) orig.reply(false);
  +        //If there is a Return-Path header,
  +        if (orig.getHeader("Return-Path") != null) {
  +            //Return the message to that address, not to the Reply-To address
  +            reply.setRecipient(MimeMessage.RecipientType.TO, new 
InternetAddress(orig.getHeader("Return-Path")[0]));
  +        }
           //Create the list of recipients in our MailAddress format
           Collection recipients = new HashSet();
           Address addresses[] = reply.getAllRecipients();
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to