james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Angus" <da...@thought.co.uk>
Subject RE: problem sending email, body in Rich Text Format / Plain Text
Date Wed, 03 Apr 2002 19:11:44 GMT
It seems strange, but may be because "application/octet-stream" is the
lowest common denominator content type used for any unknown content-type, it
basically translates as "this type is unknown, treat it as a raw binary and
let someone else figure it out"

It would appear that javax.mail cannot cope with an email who's only part is
either a) Disposition: attachment or b) Content-type:
application/octet-stream

Probably because it (or some guy at sun) believes that it cannot create a
complete mail message from it.

HTML email in Outlook is actually Content-type: multipart/alternative,
Attachments are always sent as Content-type: multipart/mixed , but plain
text is not usually multipart at all unless it has an attachment, I don't
know about M$ rtf.
I think HTML email works because it contains the framework of a multipart
message already, even if it is empty of content.

I don't yet know for sure what the reason for your error is, but I bet its
related to the issues above, and that means that its not our bug, but a bug
in javax.mail from sun.

:-(

d.


> -----Original Message-----
> From: Kishore Metla [mailto:KMetla@PALMERHILL.com]
> Sent: 03 April 2002 19:49
> To: 'james-dev@jakarta.apache.org'
> Subject: FW: problem sending email, body in Rich Text Format / Plain
> Text
>
>
>
> Hi,
>
> I did not get any answer and this is kind of important. Can someone please
> help me.
>
> Thanks in advance
> -Kishore
>
> -----Original Message-----
> From: Kishore Metla [mailto:KMetla@PALMERHILL.com]
> Sent: Monday, April 01, 2002 11:16 AM
> To: 'james-user@jakarta.apache.org'
> Subject: problem sending email, body in Rich Text Format / Plain Text
>
>
>
> Hi,
>
> I have James set up. I have a problem when sending an email using
> Microsoft
> Outlook 2000 Plain Text or Rich Text to the James with an attachment but
> with no message in the body.
>
> I am choosing the format of the mail in the Outlook by going to Tools >>
> Options >> Mail Format >> 'Choose a format for outgoing mail ...'  and
> choosing the option as 2 or 3 from the available as listed below
> 1. HTML
> 2. Microsoft Outlook Rich Text
> 3. Plain Text
>
> When I send an email to the James Server to categorize, choosing
> HTML (with
> or without a message in the body) it works fine. If I send an
> email choosing
> either Plain Text or Rich Text with some message in the body it
> works fine.
> But If no message in the body (sending just an attachment) it
> fails throwing
> an exception (see below).
> ------------------------------------------------------------------
> ----------
> ------------------------------------------------------------------
> ----------
> --------------------
> javax.activation.UnsupportedDataTypeException: no object DCH for MIME type
> application/octet-stream;
> name="example.PDF"
> at
> javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
> at javax.activation.DataHandler.writeTo(DataHandler.java:305)
> at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1089)
> at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:635)
> at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:233)
> at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:68)
> at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:849)
> at javax.activation.DataHandler.writeTo(DataHandler.java:305)
> at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1089)
> at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1527)
> at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1503)
> at org.apache.james.core.MailImpl.writeMessageTo(MailImpl.java:198)
> at
> org.apache.james.mailrepository.AvalonMailRepository.store(AvalonM
> ailReposit
> ory.java:98)
> at org.apache.james.James.sendMail(James.java:298)
> at org.apache.james.James.sendMail(James.java:278)
> at org.apache.james.James.sendMail(James.java:270)
> at
> org.apache.james.transport.mailets.NotifyPostmaster.service(Notify
> Postmaster
> .java:167)
> at
> org.apache.james.transport.LinearProcessor.service(LinearProcessor
> .java:152)
> at
> org.apache.james.transport.JamesSpoolManager.process(JamesSpoolMan
> ager.java:
> 166)
> at
> org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager
> .java:142)
> at org.apache.avalon.utils.recycle.pool.Worker.run(Worker.java:113)
> Exception in processor <local>
> javax.mail.MessagingException: Exception spooling message:
> Exception caught
> while storing Message Container: javax.activ
> ation.UnsupportedDataTypeException: no object DCH for MIME type
> application/octet-stream;
> name="example.PDF"
> at org.apache.james.James.sendMail(James.java:304)
> at org.apache.james.James.sendMail(James.java:278)
> at org.apache.james.James.sendMail(James.java:270)
> at
> org.apache.james.transport.mailets.NotifyPostmaster.service(Notify
> Postmaster
> .java:167)
> at
> org.apache.james.transport.LinearProcessor.service(LinearProcessor
> .java:152)
> at
> org.apache.james.transport.JamesSpoolManager.process(JamesSpoolMan
> ager.java:
> 166)
> at
> org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager
> .java:142)
> at org.apache.avalon.utils.recycle.pool.Worker.run(Worker.java:113)
> ------------------------------------------------------------------
> ----------
> ------------------------------------------------------------------
> ----------
> --------------------
>
> For your information, I tried to check what it is doing. For the
> email sent
> in HTML (successful case),
>
> ..........
> MIME-Version: 1.0
> X-Mailer: Internet Mail Service (5.5.2653.19)
> Content-Type: multipart/mixed;
> 	boundary="----_=_NextPart_000_01C1D763.B43A2C50"
> Status:
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> ------_=_NextPart_000_01C1D763.B43A2C50
> Content-Type: multipart/alternative;
> 	boundary="----_=_NextPart_001_01C1D763.B43A2C50"
> ------_=_NextPart_001_01C1D763.B43A2C50
> Content-Type: text/plain;
> 	charset="iso-8859-1"
> ------_=_NextPart_001_01C1D763.B43A2C50
> Content-Type: text/html;
> 	charset="iso-8859-1"
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> <META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
> <BODY>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>
> ------_=_NextPart_001_01C1D763.B43A2C50--
> ------_=_NextPart_000_01C1D763.B43A2C50
> Content-Type: application/msword;
> 	name="1014671916703Test1.doc"
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment;
> 	filename="1014671916703Test1.doc"
> .................
>
>
> But when I did the same for the non-working case, it skips part of it.
>
> Any help would be greatly appreciated.
>
> thanks
> -Kishore
>
>
>
>


--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message