I have just downloaded the javamail utility. I tried compile and run two
classes from its demo: msgsendsample.java and msgsend.java.
They were compiled succesfully but after trying them run I have got the
exception bellow:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type
text/plain; charset=us-ascii
at
javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:841)
at javax.activation.DataHandler.writeTo(DataHandler.java:295)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1147)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1600)
at
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:324)
at javax.mail.Transport.send0(Transport.java:163)
at javax.mail.Transport.send(Transport.java:80)
at msgsendsample.main(msgsendsample.java:95)
I tried to change charsets but it had no effect.
Can anybody help me? What should I do?
Peter
Assuming you have tried this with a text-only message body . . . .
Check the documentation for java version level required. Make
sure your java version level is same or higher.
Check with your Unix mail admin to make sure you have the
correct host. Use the IP address to make double-sure there can
be no mistake.
For test purposes do not play games with the email addresses, use
only existing (internal) complete addresses (some...@mycompany.com)
Go into the code and turn on the debugging. Recompile, try it and read
the screens.
Ray