I am facing a strange problem when I am running my java mail code from eclipse it is being sent as an inline message but when same java code is being executed from an ant script than it is being sent as an attachment I have shared the code for sending java mail below, Please help me with this.
Look at the headers of the two mail messages which are different. You should find evidence that they were sent by JavaMail and you might find more interesting evidence. At any rate it's probable that the difference is caused by some configuration difference between the two systems. For code it's easy to say "Post your code" but for configuration we can't say "Post your configuration" because that could be all sorts of things. You could also modify your code so that it inserts the JavaMail version number into the message.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Java mail is being sent as an attachment using ant but as an inline when prog run from eclipse