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)...........................................