geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Færch (JIRA) <...@geronimo.apache.org>
Subject [jira] Updated: (GERONIMO-1402) Recipients set by calling MimeMessage.setRecipients(RecipientType, Adress[]) not remembered by getAllRecipients()
Date Mon, 26 Dec 2005 11:20:31 GMT
     [ http://issues.apache.org/jira/browse/GERONIMO-1402?page=all ]

Jakob Færch updated GERONIMO-1402:
----------------------------------

    Attachment: patch-javamail-casesensitive-headers.patch

The patch in file javamail-casesensitive-headers.patch fixes the issue I'm seeing. 

I can't tell for sure that it will not break anything, but the tests run without error when
building the specs. 

The fact that addHeader already lowercases the key make me believe, that the fix is healthy.


> 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
>  Attachments: patch-javamail-casesensitive-headers.patch
>
> 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


Mime
View raw message