You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Marcello Marangio <m....@tno.it> on 2003/10/02 09:38:14 UTC

R: Problem with MIME type message/delivery-status

Hi Andreas
in <JAVA_HOME>/jre/lib there is (or there should be) the file mailcap; you
have to edit it to add the mapping between "message/delivery-status" and a
handler.

It should look like:

message/delivery-status;; 		x-java-content-handler=my.package.MyClass

Cheers
Marcello

> -----Messaggio originale-----
> Da: Andreas Göggerle [mailto:andreas.goeggerle@pansoft.de]
> Inviato: giovedì 25 settembre 2003 18.07
> A: 'James Developers List'
> Cc: werling@pansoft.de
> Oggetto: Problem with MIME type message/delivery-status
>
>
> Hi everyone,
>
> while writing a DSNBounce mailet that produces RFC3464 conform
> Delivery Status Notifications I encountered a problem with the
> MIME type "message/delivery-status".
> When I try to send a multipart mail with a bodypart having this
> MIME type, I get the follwing runtime exception:
>
> [cut]
>
> This is how I set the MIME type:
>
> MimeBodyPart dsn = new MimeBodyPart();
> MimeMessage dsnMessage = new
> MimeMessage(Session.getDefaultInstance(System.getProperties(), null));
> StringWriter sout = new StringWriter();
> [...]
> dsnMessage.setText(sout.toString());
> dsnMessage.saveChanges();
> dsn.setContent(dsnMessage, "message/delivery-status");
>
> I'm using sun's mail.jar version 1.3.1 and activation.jar version 1.0.2
> I'm running james-3.0a1 from CVS HEAD on a Win2000 OS
>
>
> How can I solve this problem? Seems I have to somehow "register"
> a DataContentHandler for the MIME type, but I have no idea how/where
> to do so. Any help would be appreciated.
>
> Thanks in advance
>    Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org


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


RE: Problem with MIME type message/delivery-status

Posted by "Noel J. Bergman" <no...@devtech.com>.
> in <JAVA_HOME>/jre/lib there is (or there should be) the file mailcap; you
> have to edit it to add the mapping between "message/delivery-status" and a
> handler.

> It should look like:
> message/delivery-status;; 		x-java-content-handler=my.package.MyClass

I believe that there is also a programmatic way to register a DCH, although
I would have to go back and search.

	--- Noel


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