Recipients set by calling MimeMessage.setRecipients(RecipientType, Adress[]) 
not remembered by getAllRecipients()
-----------------------------------------------------------------------------------------------------------------

         Key: GERONIMO-1402
         URL: http://issues.apache.org/jira/browse/GERONIMO-1402
     Project: Geronimo
        Type: Bug
  Components: mail  
    Reporter: Jakob Færch


In the AdventureBuilder blueprint application, the following snippet is used in 
class com.sun.j2ee.blueprints.opc.mailerMailHelper to send an email using 
JavaMail:

msg.setRecipients(Message.RecipientType.TO,
                            InternetAddress.parse(emailAddress, false));
  [...]
Transport.send(msg);

Transport in turn calls getAllRecipients() on the message, which returns an 
empty array.

As far as I could tell, the error is caused by the method 
javax.mail.InternetHeaders#getHeaderList(String) from the geronimo javamail 
implementation looks up the headers in a map using as key the lowercase version 
of the header name supplied, whereas the setHeader method puts the header using 
as key the unmodified header name. The addHeader method correctly lowercases 
the header name before storing it in the map.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to