Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
2.1
-
None
-
None
-
Operating System: All
Platform: All
-
18028
Description
If Redirect handles a message where the content type is multipart, then the
message itself is not redirected only something like:
javax.mail.internet.MimeMultipart@caf6c1
gets sent as the message body.
(Comments from Noel): Redirect calls message.getContent().toString(). The
problem is that the getContent() method returns a String if the content is
"text/plain", an InputStream if it there is no DataHandler, and a Multipart
object if the content is a multipart type.
This bug can be reproduced by configuring the mailet with <inline> all
</inline> parameter, and then sending a message in HTML that would trigger the
mailet:
<mailet match="RecipientIs=bad@domain.tld"
class="Redirect">
<recipients> postmaster@domain.tld </recipients>
<inline> all </inline>
<replyto> postmaster </replyto>
<static> true </static>
<passThrough> false </passThrough>
</mailet>
Though I've only tested this on WinNT v4.0 SP6a, JDK 1.4.1_01, and James
2.1.2a2, given the Redirect code is the same on all platforms, it is expected
to have the same problem on all platforms and environments.