You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Jakob Færch (JIRA)" <de...@geronimo.apache.org> on 2005/12/26 12:16:31 UTC

[jira] Created: (GERONIMO-1402) Recipients set by calling MimeMessage.setRecipients(RecipientType, Adress[]) not remembered by getAllRecipients()

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


[jira] Updated: (GERONIMO-1402) Recipients set by calling MimeMessage.setRecipients(RecipientType, Adress[]) not remembered by getAllRecipients()

Posted by "Jakob Færch (JIRA)" <de...@geronimo.apache.org>.
     [ 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


[jira] Updated: (GERONIMO-1402) Recipients set by calling MimeMessage.setRecipients(RecipientType, Adress[]) not remembered by getAllRecipients()

Posted by "Jakob Færch (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1402?page=all ]

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

    Version: 1.0

> 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
>     Versions: 1.0
>     Reporter: Jakob Færch
>     Assignee: Jacek Laskowski
>  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


[jira] Assigned: (GERONIMO-1402) Recipients set by calling MimeMessage.setRecipients(RecipientType, Adress[]) not remembered by getAllRecipients()

Posted by "Jacek Laskowski (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1402?page=all ]

Jacek Laskowski reassigned GERONIMO-1402:
-----------------------------------------

    Assign To: Jacek Laskowski

> 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
>     Assignee: Jacek Laskowski
>  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


[jira] Resolved: (GERONIMO-1402) Recipients set by calling MimeMessage.setRecipients(RecipientType, Adress[]) not remembered by getAllRecipients()

Posted by "Rick McGuire (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1402?page=all ]
     
Rick McGuire resolved GERONIMO-1402:
------------------------------------

    Fix Version: 1.1
     Resolution: Fixed

This has already been fixed in the latest javamail spec code. 

> 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
>     Security: public(Regular issues) 
>   Components: mail
>     Versions: 1.0
>     Reporter: Jakob Færch
>     Assignee: Jacek Laskowski
>      Fix For: 1.1
>  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