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(AvalonMailReposit
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(NotifyPostmaster
.java:167)
at
org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:152)
at
org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.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(NotifyPostmaster
.java:167)
at
org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:152)
at
org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.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



Reply via email to