james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/james James.java
Date Fri, 09 May 2003 02:15:41 GMT
noel        2003/05/08 19:15:41

  Modified:    src/java/org/apache/james Tag: branch_2_1_fcs James.java
  Log:
  Applied Steen Jansdal's fix for non-InternetAddress addresses
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.35.4.7  +11 -3     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.35.4.6
  retrieving revision 1.35.4.7
  diff -u -r1.35.4.6 -r1.35.4.7
  --- James.java	7 May 2003 15:47:32 -0000	1.35.4.6
  +++ James.java	9 May 2003 02:15:40 -0000	1.35.4.7
  @@ -420,7 +420,11 @@
           Collection recipients = new HashSet();
           Address addresses[] = message.getAllRecipients();
           for (int i = 0; i < addresses.length; i++) {
  -            recipients.add(new MailAddress((InternetAddress)addresses[i]));
  +            // Javamail treats the "newsgroups:" header field as a
  +            // recipient, so we want to filter those out.
  +            if ( addresses[i] instanceof InternetAddress ) {
  +                recipients.add(new MailAddress((InternetAddress)addresses[i]));
  +            }
           }
           sendMail(sender, recipients, message);
       }
  @@ -703,7 +707,11 @@
           Collection recipients = new HashSet();
           Address addresses[] = reply.getAllRecipients();
           for (int i = 0; i < addresses.length; i++) {
  -            recipients.add(new MailAddress((InternetAddress)addresses[i]));
  +            // Javamail treats the "newsgroups:" header field as a
  +            // recipient, so we want to filter those out.
  +            if ( addresses[i] instanceof InternetAddress ) {
  +                recipients.add(new MailAddress((InternetAddress)addresses[i]));
  +            }
           }
           //Change the sender...
           reply.setFrom(bouncer.toInternetAddress());
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message