Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed  RSS feed

 
mukesh pandey
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am facing a strange issue. my requirement is to send a mail with attachement by calling mailsender program from ant task. the attachement is a file and it's filename will be provided from ant task itself. so I made a mail sender program and i am running it from main mehod its working fine but when I run it from ant task it thows an exception though it send the mail but do not send any thing in that mail neither mail subject nor mail content and attachement. and when I simple call this method from ant without supplying file name to be attached it is able to esnd me mail with subject and mail content. although every things is working fine while calling from main method. belwo is the exceprion I got.

javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
[mytask] boundary="----=_Part_0_17870931.1285953389694"
[mytask] at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:877)
[mytask] at javax.activation.DataHandler.writeTo(DataHandler.java:302)...........................................

in next post I ll be attaching the my code
 
mukesh pandey
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
main method to call mail sender:

mail sender classs:

build file from where I am calling the mail sender program:
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags next time. I've added them for you this time.

This looks to be related mostly to JavaMail so I'm moving this thread to Other JSE/JEE APIs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!